-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
None
In generator, we have https://github.com/mongoid/mongoid/blob/master/lib/rails/generators/mongoid/config/templates/mongoid.yml#L42-L43
# Protect id and type from mass assignment. (default: true) # protect_sensitive_fields: true
but, when I set protect_sensitive_fields: false, I got errors like
Problem:
Invalid configuration option: protect_sensitive_fields.
Summary:
A invalid configuration option was provided in your mongoid.yml, or a typo is potentially present. The valid configuration options are: :include_root_in_json, :include_type_for_serialization, :preload_models, :raise_not_found_error, :scope_overwrite_exception, :duplicate_fields_exception, :use_activesupport_time_zone, :use_utc.
Resolution:
Remove the invalid option or fix the typo. If you were expecting the option to be there, please consult the following page with repect to Mongoid's configuration:
http://mongoid.org/en/mongoid/docs/installation.html (Mongoid::Errors::InvalidConfigOption)
Was protect_sensitive_fields gone in mongoid 4.0?