lib/outboxable.rb in outboxable-0.1.8 vs lib/outboxable.rb in outboxable-1.0.0
- old
+ new
@@ -18,10 +18,10 @@
included do
after_create :instantiate_outbox_for_create, if: proc { |object| object.check_outbox_condition(object:, operation: :create) }
after_update :instantiate_outbox_for_update, if: proc { |object| object.check_outbox_condition(object:, operation: :update) }
- has_many :outboxes, as: :outboxable, autosave: false
+ has_many :outboxes, as: :outboxable, dependent: :destroy
def instantiate_outbox(routing_key:)
outboxes.new(
routing_key:,
exchange: Outboxable.configuration.rabbitmq_event_bus_exchange,