method

group_by_attribute

Importance_1
Ruby on Rails latest stable (v7.1.3.2) - 0 notes - 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>]}
Show source
Register or log in to add new notes.