method
sanitize_for_mass_assignment
v4.2.1 -
Show latest stable
- Class:
ActiveModel::ForbiddenAttributesProtection
sanitize_for_mass_assignment(attributes)protected
No documentation available.
# File activemodel/lib/active_model/forbidden_attributes_protection.rb, line 19
def sanitize_for_mass_assignment(attributes)
if attributes.respond_to?(:permitted?) && !attributes.permitted?
raise ActiveModel::ForbiddenAttributesError
else
attributes
end
end