class ActiveModel::MassAssignmentSecurity::Sanitizer
:nodoc:
def process_removed_attributes(klass, attrs)
def process_removed_attributes(klass, attrs) raise NotImplementedError, "#process_removed_attributes(klass, attrs) is intended to be overwritten by a subclass" end
def sanitize(klass, attributes, authorizer)
:nodoc:
def sanitize(klass, attributes, authorizer) rejected = [] sanitized_attributes = attributes.reject do |key, value| rejected << key if authorizer.deny?(key) end process_removed_attributes(klass, rejected) unless rejected.empty? sanitized_attributes end