instance method
sanitize
Ruby on Rails 3.2.22.5
Since v3.0.20 Last seen in v3.2.22.5Signature
sanitize(attributes, authorizer)
Returns all attributes not denied by the authorizer.
Parameters
-
attributesreq -
authorizerreq
Source
# File activemodel/lib/active_model/mass_assignment_security/sanitizer.rb, line 10
def sanitize(attributes, authorizer)
sanitized_attributes = attributes.reject { |key, value| authorizer.deny?(key) }
debug_protected_attribute_removal(attributes, sanitized_attributes)
sanitized_attributes
end
Defined in activemodel/lib/active_model/mass_assignment_security/sanitizer.rb line 10
· View on GitHub
· Improve this page
· Find usages on GitHub