Exception: Acta::ProjectionWriteError
- Defined in:
- lib/acta/errors.rb
Instance Attribute Summary collapse
-
#model_class ⇒ Object
readonly
Returns the value of attribute model_class.
-
#write_method ⇒ Object
readonly
Returns the value of attribute write_method.
Instance Method Summary collapse
-
#initialize(model_class:, write_method:) ⇒ ProjectionWriteError
constructor
A new instance of ProjectionWriteError.
Constructor Details
#initialize(model_class:, write_method:) ⇒ ProjectionWriteError
Returns a new instance of ProjectionWriteError.
91 92 93 94 95 96 97 98 99 100 |
# File 'lib/acta/errors.rb', line 91 def initialize(model_class:, write_method:) @model_class = model_class @write_method = write_method super( "Direct #{write_method} on #{model_class.name} bypasses the event log. " \ "#{model_class.name} is acta_managed! — its rows are owned by an Acta::Projection. " \ "Emit an event so the projection can update the row, or wrap intentional " \ "out-of-band writes in `Acta::Projection.applying! { ... }` (fixtures, migrations, backfills)." ) end |
Instance Attribute Details
#model_class ⇒ Object (readonly)
Returns the value of attribute model_class.
89 90 91 |
# File 'lib/acta/errors.rb', line 89 def model_class @model_class end |
#write_method ⇒ Object (readonly)
Returns the value of attribute write_method.
89 90 91 |
# File 'lib/acta/errors.rb', line 89 def write_method @write_method end |