From 738f2cb72c295c63c3581ae69d990344d9b947a8 Mon Sep 17 00:00:00 2001 From: Sam Date: Tue, 24 Feb 2015 11:26:44 +1100 Subject: [PATCH] REGRESSION: pms not ordering on bumped_at descending --- lib/topic_query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/topic_query.rb b/lib/topic_query.rb index 0e38b881cb1..eebb5a02873 100644 --- a/lib/topic_query.rb +++ b/lib/topic_query.rb @@ -228,7 +228,7 @@ class TopicQuery result = Topic.includes(:allowed_users) .where("topics.id IN (SELECT topic_id FROM topic_allowed_users WHERE user_id = #{user.id.to_i})") .joins("LEFT OUTER JOIN topic_users AS tu ON (topics.id = tu.topic_id AND tu.user_id = #{user.id.to_i})") - .order("topics.bumped_at") + .order("topics.bumped_at DESC") .private_messages result = result.limit(options[:per_page]) unless options[:limit] == false