Flowdock
method

to_hash

Importance_1
v4.0.2 - Show latest stable - 0 notes - Class: ActiveModel::Errors
to_hash(full_messages = false) public

Returns a Hash of attributes with their error messages. If full_messages is true, it will contain full messages (see full_message).

person.errors.to_hash       # => {:name=>["can not be nil"]}
person.errors.to_hash(true) # => {:name=>["name can not be nil"]}
Show source
Register or log in to add new notes.