instance method
each
Ruby on Rails edge
Signature
each(&block)
Iterates through each error object.
“‘ person.errors.add(:name, :too_short, count: 2) person.errors.each do |error|
# Will yield <#ActiveModel::Error attribute=name, type=too_short,
options={:count=>2}>
end “‘
Source
# File activemodel/lib/active_model/errors.rb, line 70
Defined in activemodel/lib/active_model/errors.rb line 70
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Errors