Exception: Pragma::Decorator::Association::InconsistentTypeError
- Inherits:
-
StandardError
- Object
- StandardError
- Pragma::Decorator::Association::InconsistentTypeError
- Defined in:
- lib/pragma/decorator/association/errors.rb
Overview
This error is raised when an association’s type is different from its type as reported by the model’s reflection.
Instance Method Summary collapse
-
#initialize(decorator:, reflection:, model_type:) ⇒ InconsistentTypeError
constructor
Initializes the error.
Constructor Details
#initialize(decorator:, reflection:, model_type:) ⇒ InconsistentTypeError
Initializes the error.
56 57 58 59 60 61 62 63 |
# File 'lib/pragma/decorator/association/errors.rb', line 56 def initialize(decorator:, reflection:, model_type:) = <<~MSG.tr("\n", ' ') #{decorator.class}: Association #{reflection.attribute} is defined as #{model_type} on the model, but as #{reflection.type} in the decorator. MSG super end |