method
[]
[](attribute)
public
Hide source
# File activemodel/lib/active_model/errors.rb, line 35 def [](attribute) if errors = get(attribute.to_sym) errors.size == 1 ? errors.first : errors else set(attribute.to_sym, []) end end