Commit a3467c3d authored by Allison Browne's avatar Allison Browne Committed by Michael Kozono

Fix deprecation warning

Wrap with Arel.sql to fix Dangerous query method
deprecation warning
parent 4beb564b
......@@ -67,7 +67,9 @@ module Awardable
)
).join_sources
joins(join_clause).group(awardable_table[:id]).reorder("COUNT(award_emoji.id) #{direction}")
joins(join_clause).group(awardable_table[:id]).reorder(
Arel.sql("COUNT(award_emoji.id) #{direction}")
)
end
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