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