method

[]=

Importance_1
v3.0.0 - Show latest stable - 0 notes - Class: ActiveModel::Errors
[]=(attribute, error) public

Adds to the supplied attribute the supplied error message.

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