instance method sanitize

Ruby on Rails 3.2.22.5

Since v3.0.20 Last seen in v3.2.22.5

Available in: v3.0.20 v3.1.12 v3.2.22.5

Signature

sanitize(attributes, authorizer)

Returns all attributes not denied by the authorizer.

Parameters

attributes req
authorizer req
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

Defined in ActiveModel::MassAssignmentSecurity::Sanitizer

Type at least 2 characters to search.

↑↓ navigate · open · esc close