instance method
sanitize
Ruby on Rails 3.0.20
Since v3.0.20 Last seen in v3.2.22.5Signature
sanitize(attributes)
Returns all attributes not denied by the authorizer.
Parameters
-
attributesreq
Source
# 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
Defined in activemodel/lib/active_model/mass_assignment_security/sanitizer.rb line 5
· View on GitHub
· Improve this page
· Find usages on GitHub