Flowdock
method

include?

Importance_1
v4.0.2 - Show latest stable - 0 notes - Class: ActiveModel::Errors
include?(attribute) public

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

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