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

#write_attributes= should accept an optional 2nd argument to opt-out of mass assignment security

    • Type: Icon: Task Task
    • Resolution: Done
    • 12_01_17
    • Affects Version/s: None
    • Component/s: None
    • Labels:

      ActiveRecord::Base#write_attributes accepts an optional 2nd argument (defaults to true) to control whether mass assignment security is applied. Use case: We have documents created via hashes by our applications where we trust the input and then these documents are updated by users that we do not trust.

      https://github.com/rails/rails/blob/v3.0.3/activerecord/lib/active_record/base.rb#L1531

            Assignee:
            Unassigned Unassigned
            Reporter:
            cgriego Chris Griego
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: