aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/forbidden_attributes_protection.rb
diff options
context:
space:
mode:
authorGuillermo Iguaran <guilleiguaran@gmail.com>2012-08-13 00:41:04 -0500
committerGuillermo Iguaran <guilleiguaran@gmail.com>2012-09-16 23:58:21 -0500
commit1fa4f9243d09b3872a110c1057a828a753822728 (patch)
tree9915b652a1bb4ec6bc72b40e44d10c2d1653009a /activemodel/lib/active_model/forbidden_attributes_protection.rb
parent4b608c009e155d79532a00b97ac0ec524d7ad849 (diff)
downloadrails-1fa4f9243d09b3872a110c1057a828a753822728.tar.gz
rails-1fa4f9243d09b3872a110c1057a828a753822728.tar.bz2
rails-1fa4f9243d09b3872a110c1057a828a753822728.zip
Rename ForbiddenAttributes exception to ForbiddenAttributesError
Diffstat (limited to 'activemodel/lib/active_model/forbidden_attributes_protection.rb')
-rw-r--r--activemodel/lib/active_model/forbidden_attributes_protection.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/forbidden_attributes_protection.rb b/activemodel/lib/active_model/forbidden_attributes_protection.rb
index 29bc47f151..a5e4c4f650 100644
--- a/activemodel/lib/active_model/forbidden_attributes_protection.rb
+++ b/activemodel/lib/active_model/forbidden_attributes_protection.rb
@@ -1,11 +1,11 @@
module ActiveModel
- class ForbiddenAttributes < StandardError
+ class ForbiddenAttributesError < StandardError
end
module ForbiddenAttributesProtection
def sanitize_for_mass_assignment(attributes, options = {})
if attributes.respond_to?(:permitted?) && !attributes.permitted?
- raise ActiveModel::ForbiddenAttributes
+ raise ActiveModel::ForbiddenAttributesError
else
attributes
end