Flowdock
include?(attribute) public

Returns true if the error messages include an error for the given key attribute, false otherwise.

person.errors.messages        # => {:name=>["cannot be nil"]}
person.errors.include?(:name) # => true
person.errors.include?(:age)  # => false
Show source
Register or log in to add new notes.