Uploaded image for project: 'Mongoid'
  1. Mongoid
  2. MONGOID-3822

protect_sensitive_fields does not work with mongoid 4.0?

    • Type: Icon: Task Task
    • Resolution: Done
    • 5.0.0
    • 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?

            Assignee:
            Unassigned Unassigned
            Reporter:
            sonots sonots
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: