Exception: ActiveRecord::AttributeAssignmentError
- Inherits:
-
ActiveRecordError
- Object
- StandardError
- ActiveRecordError
- ActiveRecord::AttributeAssignmentError
- Defined in:
- lib/gems/activerecord-2.2.2/lib/active_record/base.rb
Overview
Raised when an error occurred while doing a mass assignment to an attribute through the 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, exception, attribute) ⇒ AttributeAssignmentError
constructor
A new instance of AttributeAssignmentError.
Constructor Details
#initialize(message, exception, attribute) ⇒ AttributeAssignmentError
Returns a new instance of AttributeAssignmentError.
134 135 136 137 138 |
# File 'lib/gems/activerecord-2.2.2/lib/active_record/base.rb', line 134 def initialize(, exception, attribute) @exception = exception @attribute = attribute @message = end |
Instance Attribute Details
#attribute ⇒ Object (readonly)
Returns the value of attribute attribute.
133 134 135 |
# File 'lib/gems/activerecord-2.2.2/lib/active_record/base.rb', line 133 def attribute @attribute end |
#exception ⇒ Object (readonly)
Returns the value of attribute exception.
133 134 135 |
# File 'lib/gems/activerecord-2.2.2/lib/active_record/base.rb', line 133 def exception @exception end |