Module: ActiveModel::MassAssignmentSecurity::Sanitizer
- Defined in:
- activemodel/lib/active_model/mass_assignment_security/sanitizer.rb
Instance Method Summary collapse
-
#sanitize(attributes) ⇒ Object
Returns all attributes not denied by the authorizer.
Instance Method Details
#sanitize(attributes) ⇒ Object
Returns all attributes not denied by the authorizer.
5 6 7 8 9 |
# File 'activemodel/lib/active_model/mass_assignment_security/sanitizer.rb', line 5 def sanitize(attributes) sanitized_attributes = attributes.reject { |key, value| deny?(key) } debug_protected_attribute_removal(attributes, sanitized_attributes) sanitized_attributes end |