diff options
Diffstat (limited to 'activemodel/lib/active_model/forbidden_attributes_protection.rb')
-rw-r--r-- | activemodel/lib/active_model/forbidden_attributes_protection.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/forbidden_attributes_protection.rb b/activemodel/lib/active_model/forbidden_attributes_protection.rb index d2c6a89cc2..4b37f80c52 100644 --- a/activemodel/lib/active_model/forbidden_attributes_protection.rb +++ b/activemodel/lib/active_model/forbidden_attributes_protection.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module ActiveModel # Raised when forbidden attributes are used for mass assignment. # @@ -15,7 +17,7 @@ module ActiveModel end module ForbiddenAttributesProtection # :nodoc: - protected + private def sanitize_for_mass_assignment(attributes) if attributes.respond_to?(:permitted?) raise ActiveModel::ForbiddenAttributesError if !attributes.permitted? |