W3cubDocs

/Ruby on Rails 7.0

class ActiveRecord::AttributeAssignmentError

Parent:
ActiveRecord::ActiveRecordError

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.

Attributes

attribute[R]
exception[R]

Public Class Methods

new(message = nil, exception = nil, attribute = nil) Show source
# File activerecord/lib/active_record/errors.rb, line 355
def initialize(message = nil, exception = nil, attribute = nil)
  super(message)
  @exception = exception
  @attribute = attribute
end
Calls superclass method

© 2004–2021 David Heinemeier Hansson
Licensed under the MIT License.