method
[]
[](attribute)
public
When passed a symbol or a name of a method, returns an array of errors for the method.
person.errors[:name] # => ["can not be nil"] person.errors['name'] # => ["can not be nil"]
[](attribute)
public
When passed a symbol or a name of a method, returns an array of errors for the method.
person.errors[:name] # => ["can not be nil"] person.errors['name'] # => ["can not be nil"]