Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid option :in provided for field #30

Closed
justincy opened this issue Jul 2, 2013 · 1 comment
Closed

Invalid option :in provided for field #30

justincy opened this issue Jul 2, 2013 · 1 comment

Comments

@justincy
Copy link

justincy commented Jul 2, 2013

Running bundle exec rake db:migrate gives me this error

rake aborted!

Problem:
  Invalid option :in provided for field :record_type.
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 :record_type on 'Freereg1CsvFile', please provide valid options for the field. These are currently: as, default, identity, label, localize, metadata, pre_processed, subtype, type, versioned. If you meant to define a custom field option, please do so first like so:

   Mongoid::Fields.option :in do |model, field, value|
     # Your logic here...
   end
   class Freereg1CsvFile
     include Mongoid::Document
     field :record_type, in: true
   end
@justincy
Copy link
Author

justincy commented Aug 8, 2013

Not happening anymore

@justincy justincy closed this as completed Aug 8, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant