I am using the githead version of Mongoid (due to Rails 4) and I want to make the required document with:
class MyClass
include Mongoid::Document
field :name, type: String, required: true
And I have this error:
Problem: Invalid option :required provided for field :name. Summary: Mongoid requires that you only provide valid options on each field definition in order to prevent un...
What am I doing wrong?
Tolsi source
share