Remove autosave: false

This commit is contained in:
Brusk Awat 2023-04-13 20:58:47 +03:00
parent 15e1c9011a
commit ae5e53d5c0
Signed by: broosk1993
GPG Key ID: 5D20F7E02649F74E

View File

@ -20,7 +20,7 @@ module Outboxable
after_create :instantiate_outbox_for_create, if: proc { |object| object.check_outbox_condition(object:, operation: :create) } 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) } 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:) def instantiate_outbox(routing_key:)
outboxes.new( outboxes.new(