Commit a1572e65 authored by Grzegorz Bizon's avatar Grzegorz Bizon

Improve ToggableQueries and fix Rubocop offenses

parent f7025556
......@@ -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)
......
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