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.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb
index 9800d9305e..98e16ea455 100644
--- a/activemodel/lib/active_model/errors.rb
+++ b/activemodel/lib/active_model/errors.rb
@@ -64,7 +64,7 @@ module ActiveModel
include Enumerable
extend Forwardable
- def_delegators :@errors, :size, :clear, :blank?, :empty?, *(Enumerable.instance_methods(false) - [:to_a, :include?])
+ def_delegators :@errors, :size, :clear, :blank?, :empty?
LEGACY_ATTRIBUTES = [:messages, :details].freeze
@@ -309,7 +309,7 @@ module ActiveModel
end
def group_by_attribute
- group_by(&:attribute)
+ @errors.group_by(&:attribute)
end
# Adds +message+ to the error messages and used validator type to +details+ on +attribute+.