instance method
messages
Ruby on Rails edge
Since v6.1.7.10Signature
messages()
Returns a Hash of attributes with an array of their error messages. : () -> Hash[Symbol | String, Array]
Source
# File activemodel/lib/active_model/errors.rb, line 305
def messages
hash = to_hash
hash.default = EMPTY_ARRAY
hash.freeze
hash
end
Defined in activemodel/lib/active_model/errors.rb line 305
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::Errors