edge badge
Methods
#
N
Class Public methods
new(content, errors, attribute)
# File activemodel/lib/active_model/errors.rb, line 587
def initialize(content, errors, attribute)
  @errors = errors
  @attribute = attribute
  super(content.freeze)
end
Instance Public methods
<<(message)
# File activemodel/lib/active_model/errors.rb, line 593
def <<(message)
  ActiveSupport::Deprecation.warn("Calling `<<` to an ActiveModel::Errors message array in order to add an error is deprecated. Please call `ActiveModel::Errors#add` instead.")

  @errors.add(@attribute, message)
  __setobj__ @errors.messages_for(@attribute)
  self
end