edge badge
Methods
#
N
Class Public methods
new(errors)
# File activemodel/lib/active_model/errors.rb, line 625
def initialize(errors)
  @errors = errors
  super(prepare_content)
end
Instance Public methods
[]=(attribute, value)
# File activemodel/lib/active_model/errors.rb, line 630
def []=(attribute, value)
  ActiveSupport::Deprecation.warn("Calling `[]=` to an ActiveModel::Errors is deprecated. Please call `ActiveModel::Errors#add` instead.")

  @errors.delete(attribute)
  Array(value).each do |message|
    @errors.add(attribute, message)
  end

  __setobj__ prepare_content
end