aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model/errors.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib/active_model/errors.rb')
-rw-r--r--activemodel/lib/active_model/errors.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index b022a875ec..4ed3462e7e 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -76,7 +76,7 @@ module ActiveModel
@messages = {}
end
- def initialize_dup(other)
+ def initialize_dup(other) #:nodoc:
@messages = other.messages.dup
super
end
@@ -96,8 +96,8 @@ module ActiveModel
# person.errors.messages # => { :name => ["can not be nil"] }
# person.errors.include?(:name) # => true
# person.errors.include?(:age) # => false
- def include?(error)
- (v = messages[error]) && v.any?
+ def include?(attribute)
+ (v = messages[attribute]) && v.any?
end
# aliases include?
alias :has_key? :include?