Class: Castkit::ActiveRecord::InvalidModel
- Defined in:
- lib/castkit/active_record/error.rb
Overview
Raised when the object passed to ‘update_model!` is not of the expected model type.
This ensures that the DataObject only attempts to update the specific model it was designed to work with.
Instance Method Summary collapse
-
#initialize(model, obj) ⇒ InvalidModel
constructor
A new instance of InvalidModel.
Constructor Details
#initialize(model, obj) ⇒ InvalidModel
Returns a new instance of InvalidModel.
44 45 46 |
# File 'lib/castkit/active_record/error.rb', line 44 def initialize(model, obj) super("Expected instance of #{model.class}, got #{obj.class}") end |