I just used gem google maps for rails. but when do rails s. it showed
Problem:
Invalid option :geo provided for field :location.
Summary:
Mongoid requires that you only provide valid options on each field definition in order to prevent unexpected behaviour later on.
Resolution:
When defining the field :location on 'User', please provide valid options for the field. These are currently: as, default, identity, label, localize, metadata, pre_processed, subtype, type, overwrite. If you meant to define a custom field option, please do so first like so:
Mongoid::Fields.option :geo do |model, field, value|
# Your logic here...
end
class User
include Mongoid::Document
field :location, geo: true
end
I use Rails4, ruby2, I have User Model where integrated devise. and I use mongodb for database. May I know what's the problem?
Hi,
I just used gem google maps for rails. but when do rails s. it showed
Problem: Invalid option :geo provided for field :location. Summary: Mongoid requires that you only provide valid options on each field definition in order to prevent unexpected behaviour later on. Resolution: When defining the field :location on 'User', please provide valid options for the field. These are currently: as, default, identity, label, localize, metadata, pre_processed, subtype, type, overwrite. If you meant to define a custom field option, please do so first like so:
Mongoid::Fields.option :geo do |model, field, value| # Your logic here... end class User include Mongoid::Document field :location, geo: true end
I use Rails4, ruby2, I have User Model where integrated devise. and I use mongodb for database. May I know what's the problem?