We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e61ca3f commit 5b458c9Copy full SHA for 5b458c9
1 file changed
app/models/tag.rb
@@ -33,7 +33,7 @@ def self.search(term)
33
.order(Arel.sql(sanitize_sql_array(['sortname LIKE ? DESC, sortname', "#{sanitize_sql_like(stripped)}%"])))
34
35
# Select from the union of the above queries, select only the tag columns such that we can distinct them
36
- from(Arel.sql("(#{q1.to_sql} UNION #{q2.to_sql}) tags"))
+ from(Arel.sql("((#{q1.to_sql}) UNION (#{q2.to_sql})) tags"))
37
.select(Tag.column_names.map { |c| "tags.#{c}" })
38
.distinct
39
end
0 commit comments