Commit 239ca490 authored by Thong Kuah's avatar Thong Kuah

Fix rubocop offenses

parent a82e0ab2
......@@ -16,7 +16,7 @@ module AfterCommitQueue
def run_after_commit_or_now(&block)
if ApplicationRecord.inside_transaction?
if ActiveRecord::Base.connection.current_transaction.records&.include?(self)
if ActiveRecord::Base.connection.current_transaction.records&.include?(self) # rubocop: disable Database/MultipleDatabases
run_after_commit(&block)
else
# If the current transaction does not include this record, we can run
......
......@@ -10,7 +10,7 @@ RSpec.describe AfterCommitQueue do
project = build(:project)
project.run_after_commit(&test_proc)
project.save
project.save!
expect(called).to be true
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment