Skip to Content Skip to Search
v7.1.0
class ActiveRecord::AttributeAssignmentError < ActiveRecord::ActiveRecordError

ActiveRecord::AttributeAssignmentError

Raised when an error occurred while doing a mass assignment to an attribute through the ActiveRecord::Base#attributes= method. The exception has an attribute property that is the name of the offending attribute.

Methods
N

Attributes

[R] attribute
[R] exception

Public class methods

new(message = nil, exception = nil, attribute = nil)

Permalink
Source code GitHub
# File activerecord/lib/active_record/errors.rb, line 424
def initialize(message = nil, exception = nil, attribute = nil)
  super(message)
  @exception = exception
  @attribute = attribute
end
Definition files