From 0c948a587d5fd22d0d0465d81ced2be9b903a6f6 Mon Sep 17 00:00:00 2001 From: Thibaut Courouble Date: Tue, 17 Apr 2012 19:02:40 +0300 Subject: Fix confusing example in ActiveModel::Errors --- activemodel/lib/active_model/errors.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/activemodel/lib/active_model/errors.rb b/activemodel/lib/active_model/errors.rb index 016bf87d86..0c628c33c2 100644 --- a/activemodel/lib/active_model/errors.rb +++ b/activemodel/lib/active_model/errors.rb @@ -130,12 +130,12 @@ module ActiveModel # has more than one error message, yields once for each error message. # # p.errors.add(:name, "can't be blank") - # p.errors.each do |attribute, errors_array| + # p.errors.each do |attribute, error| # # Will yield :name and "can't be blank" # end # # p.errors.add(:name, "must be specified") - # p.errors.each do |attribute, errors_array| + # p.errors.each do |attribute, error| # # Will yield :name and "can't be blank" # # then yield :name and "must be specified" # end -- cgit v1.2.3