Exception: ActiveModelPersistence::ObjectNotSavedError
- Inherits:
-
ModelError
- Object
- StandardError
- ModelError
- ActiveModelPersistence::ObjectNotSavedError
- Defined in:
- lib/active_model_persistence.rb
Overview
Raised when trying to save an invalid object
Instance Attribute Summary collapse
-
#object ⇒ Object
readonly
The object that was not saved.
Instance Method Summary collapse
-
#initialize(message = nil, object = nil) ⇒ ObjectNotSavedError
constructor
Create a new error.
Constructor Details
#initialize(message = nil, object = nil) ⇒ ObjectNotSavedError
Create a new error
41 42 43 44 |
# File 'lib/active_model_persistence.rb', line 41 def initialize( = nil, object = nil) @object = object super() end |
Instance Attribute Details
#object ⇒ Object (readonly)
The object that was not saved
31 32 33 |
# File 'lib/active_model_persistence.rb', line 31 def object @object end |