Permalink
Browse files

Fix confusing example in ActiveModel::Errors

  • Loading branch information...
1 parent abc5f16 commit 71fa5ebabb9314b8264adf42e6d904bbc736bb2f @Thibaut Thibaut committed with Aditya Sanghi Apr 17, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 activemodel/lib/active_model/errors.rb
@@ -130,12 +130,12 @@ def []=(attribute, error)
# 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

0 comments on commit 71fa5eb

Please sign in to comment.