instance method
add
Ruby on Rails 2.3.18
Since v2.2.3 Last seen in v2.3.18Available in: v2.2.3 v2.3.18
Signature
add(attribute, msg = Errors.default_error_messages[:invalid])
No documentation comment.
Parameters
-
attributereq -
msgopt = Errors.default_error_messages[:invalid]
Source
# File activemodel/lib/active_model/deprecated_error_methods.rb, line 13
def add(attribute, msg = Errors.default_error_messages[:invalid])
ActiveSupport::Deprecation.warn "Errors#add(attribute, msg) has been deprecated, use Errors#[attribute] << msg instead"
self[attribute] << msg
end
Defined in activemodel/lib/active_model/deprecated_error_methods.rb line 13
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::DeprecatedErrorMethods