Method: ActiveModel::Errors#details
- Defined in:
- lib/active_model/errors.rb
#details ⇒ Object
Returns a Hash of attributes with an array of their error details.
276 277 278 279 280 281 282 283 |
# File 'lib/active_model/errors.rb', line 276 def details hash = group_by_attribute.transform_values do |errors| errors.map(&:details) end hash.default = EMPTY_ARRAY hash.freeze hash end |