method
group_by_attribute
v7.0.0 -
Show latest stable
- Class:
ActiveModel::Errors
group_by_attribute()public
Returns a Hash of attributes with an array of their Error objects.
person.errors.group_by_attribute # => {:name=>[<#ActiveModel::Error>, <#ActiveModel::Error>]}