From ae5e53d5c0cbbf3f303c9a021c5a8f9483151b5b Mon Sep 17 00:00:00 2001 From: Brusk Awat Date: Thu, 13 Apr 2023 20:58:47 +0300 Subject: [PATCH] Remove autosave: false --- lib/outboxable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/outboxable.rb b/lib/outboxable.rb index 734542f..e7389b8 100644 --- a/lib/outboxable.rb +++ b/lib/outboxable.rb @@ -20,7 +20,7 @@ module Outboxable 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(