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
a1572e65
Commit
a1572e65
authored
Jun 21, 2021
by
Grzegorz Bizon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve ToggableQueries and fix Rubocop offenses
parent
f7025556
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
app/models/concerns/taggable_queries.rb
app/models/concerns/taggable_queries.rb
+2
-2
No files found.
app/models/concerns/taggable_queries.rb
View file @
a1572e65
...
...
@@ -17,7 +17,7 @@ module TaggableQueries
matcher
=
::
ActsAsTaggableOn
::
Tagging
.
where
(
taggable_type:
CommitStatus
.
name
)
.
where
(
context:
'tags'
)
.
where
(
"taggable_id =
#{
table
}
.
#{
column
}
"
)
.
where
(
"taggable_id =
#{
connection
.
quote_table_name
(
table
)
}
.
#{
connection
.
quote_column_name
(
column
)
}
"
)
# rubocop:disable GitlabSecurity/SqlInjection
.
where
.
not
(
tag_id:
tag_ids
)
.
select
(
'1'
)
...
...
@@ -28,7 +28,7 @@ module TaggableQueries
matcher
=
::
ActsAsTaggableOn
::
Tagging
.
where
(
taggable_type:
CommitStatus
.
name
)
.
where
(
context:
'tags'
)
.
where
(
"taggable_id =
#{
table
}
.
#{
column
}
"
)
.
where
(
"taggable_id =
#{
connection
.
quote_table_name
(
table
)
}
.
#{
connection
.
quote_column_name
(
column
)
}
"
)
# rubocop:disable GitlabSecurity/SqlInjection
.
select
(
'1'
)
where
(
"EXISTS (?)"
,
matcher
)
...
...
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