aboutsummaryrefslogtreecommitdiffstats
path: root/activemodel/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activemodel/lib')
-rw-r--r--activemodel/lib/active_model/errors.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index 003c94a409..5e3cf510b0 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -84,6 +84,11 @@ module ActiveModel
messages.clear
end
+ # Do the error messages include an error with key +error+?
+ def include?(error)
+ messages.include? error
+ end
+
# Get messages for +key+
def get(key)
messages[key]