instance method
to_a
Ruby on Rails 2.2.3
Since v2.2.3Signature
to_a()
No documentation comment.
Source
# File activemodel/lib/active_model/errors.rb, line 55
def to_a
inject([]) do |errors_with_attributes, (attribute, errors)|
if error.blank?
errors_with_attributes
else
if attr == :base
errors_with_attributes << error
else
errors_with_attributes << (attribute.to_s.humanize + " " + error)
end
end
end
end
Defined in activemodel/lib/active_model/errors.rb line 55
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Errors