set(key, value)
Instance Public methods
Set messages for key
to value
.
person.errors.get(:name) # => ["cannot be nil"] person.errors.set(:name, ["can't be nil"]) person.errors.get(:name) # => ["can't be nil"]
Set messages for key
to value
.
person.errors.get(:name) # => ["cannot be nil"] person.errors.set(:name, ["can't be nil"]) person.errors.get(:name) # => ["can't be nil"]
Please login to continue.