Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
239ca490
Commit
239ca490
authored
Nov 28, 2021
by
Thong Kuah
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubocop offenses
parent
a82e0ab2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
app/models/concerns/after_commit_queue.rb
app/models/concerns/after_commit_queue.rb
+1
-1
spec/models/concerns/after_commit_queue_spec.rb
spec/models/concerns/after_commit_queue_spec.rb
+1
-1
No files found.
app/models/concerns/after_commit_queue.rb
View file @
239ca490
...
...
@@ -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
...
...
spec/models/concerns/after_commit_queue_spec.rb
View file @
239ca490
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment