method
group_by_attribute
rails 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>]}