aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib/active_model
diff options
context:
space:
mode:
authorDamien Mathieu <42@dmathieu.com>2011-09-06 18:35:12 +0200
committerDamien Mathieu <42@dmathieu.com>2011-09-06 18:36:18 +0200
commite0335e2ccbdbbd14715877c2d9c07792622e883a (patch)
tree94eccbe0b1bd827d3cd6967fa91508249e353145 /activemodel/lib/active_model
parentef14a0ec8647010eed3a8006409739e6d42791a9 (diff)
downloadrails-e0335e2ccbdbbd14715877c2d9c07792622e883a.tar.gz
rails-e0335e2ccbdbbd14715877c2d9c07792622e883a.tar.bz2
rails-e0335e2ccbdbbd14715877c2d9c07792622e883a.zip
add has_key? to ActiveModel::Errors
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r--activemodel/lib/active_model/errors.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index 843c0c3cb5..7828434927 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -88,6 +88,7 @@ module ActiveModel
def include?(error)
(v = messages[error]) && v.any?
end
+ alias :has_key? :include?
# Get messages for +key+
def get(key)