FIX: Deprecation warnings on Rails with some topic queries

This commit is contained in:
Robin Ward 2014-02-26 11:09:02 -05:00
parent 91ff3451c3
commit b94abc9c8e

View File

@ -224,6 +224,7 @@ class TopicQuery
if @user
result = result.joins("LEFT OUTER JOIN topic_users AS tu ON (topics.id = tu.topic_id AND tu.user_id = #{@user.id.to_i})")
.references('tu')
end
category_id = nil
@ -303,7 +304,7 @@ class TopicQuery
WHERE cu.user_id = ? AND
cu.category_id = topics.category_id AND
cu.notification_level = ?
)", user.id, CategoryUser.notification_levels[:muted])
)", user.id, CategoryUser.notification_levels[:muted]).references('cu')
end
list