to_hash(full_messages = false)
Instance Public methods
Returns a Hash of attributes with their error
messages. If full_messages
is true
, it will
contain full messages (see full_message
).
1 2 | person.errors.to_hash # => {:name=>["cannot be nil"]} person.errors.to_hash( true ) # => {:name=>["name cannot be nil"]} |
Please login to continue.