I'm upgrading a Rails 4.2 app with mongoid 5.2, but after the upgrade I find that options
, client
field names are not allowed.
This is the conclusion I arrived to after looking at mongoid code and seeing this exception:
NameError - undefined method options' for class
ScheduledReport':
mongoid (6.1.1) lib/mongoid/errors/invalid_field.rb:44:in `origin'
Is there any way to define a field :foo that maps to :options or whatever field in the database?
This is my model definition:
class ScheduledReport
include Mongoid::Document
field :options, type: Hash, default: {}
end
Thanks in advance!