I\'m learning MongoDB through the Mongoid Ruby gem with Rails (Rails 3 beta 3), and I\'m trying to come up with a way to create dynamic attributes on a model based on fields
Be sure to set allow_dynamic_fields: true in mongoid.yml. Example:
allow_dynamic_fields: true
mongoid.yml
defaults: &defaults allow_dynamic_fields: true parameterize_keys: true persist_in_safe_mode: true raise_not_found_error: true reconnect_time: 3 use_object_ids: false development: <<: *defaults ...