mirror of
https://github.com/discourse/discourse.git
synced 2024-11-25 09:42:07 +08:00
FIX: Deprecation warnings on Rails with some topic queries
This commit is contained in:
parent
91ff3451c3
commit
b94abc9c8e
|
@ -224,6 +224,7 @@ class TopicQuery
|
||||||
|
|
||||||
if @user
|
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})")
|
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
|
end
|
||||||
|
|
||||||
category_id = nil
|
category_id = nil
|
||||||
|
@ -303,7 +304,7 @@ class TopicQuery
|
||||||
WHERE cu.user_id = ? AND
|
WHERE cu.user_id = ? AND
|
||||||
cu.category_id = topics.category_id AND
|
cu.category_id = topics.category_id AND
|
||||||
cu.notification_level = ?
|
cu.notification_level = ?
|
||||||
)", user.id, CategoryUser.notification_levels[:muted])
|
)", user.id, CategoryUser.notification_levels[:muted]).references('cu')
|
||||||
end
|
end
|
||||||
|
|
||||||
list
|
list
|
||||||
|
|
Loading…
Reference in New Issue
Block a user