Exception: ActiveRecord::AttributeAssignmentError
- Inherits:
-
ActiveRecordError
- Object
- StandardError
- ActiveRecordError
- ActiveRecord::AttributeAssignmentError
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/errors.rb
Overview
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.
Instance Attribute Summary collapse
-
#attribute ⇒ Object
readonly
Returns the value of attribute attribute.
-
#exception ⇒ Object
readonly
Returns the value of attribute exception.
Instance Method Summary collapse
-
#initialize(message = nil, exception = nil, attribute = nil) ⇒ AttributeAssignmentError
constructor
A new instance of AttributeAssignmentError.
Constructor Details
#initialize(message = nil, exception = nil, attribute = nil) ⇒ AttributeAssignmentError
Returns a new instance of AttributeAssignmentError.
355 356 357 358 359 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/errors.rb', line 355 def initialize( = nil, exception = nil, attribute = nil) super() @exception = exception @attribute = attribute end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
353 354 355 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/errors.rb', line 353 def attribute @attribute end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
353 354 355 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/activerecord-7.0.4/lib/active_record/errors.rb', line 353 def exception @exception end |