method

[]=

Importance_1
[]=(attribute, error) public

Adds to the supplied attribute the supplied error message.

person.errors[:name] = "must be set"
person.errors[:name] # => ['must be set']
Show source
Register or log in to add new notes.