Class: Castkit::ActiveRecord::ModelNotDefined
- Defined in:
- lib/castkit/active_record/error.rb
Overview
Raised when a Castkit::DataObject does not have an associated model defined.
This typically occurs when calling ‘from_model`, `to_model`, or `update_model!` without first declaring a model via `.model SomeModel`.
Instance Method Summary collapse
-
#initialize(klass) ⇒ ModelNotDefined
constructor
A new instance of ModelNotDefined.
Constructor Details
#initialize(klass) ⇒ ModelNotDefined
23 24 25 |
# File 'lib/castkit/active_record/error.rb', line 23 def initialize(klass) super("No model defined for #{klass.name}. Did you forget to call model SomeModel?") end |