From f05cce2cc54ca1e7ae7948bd9df6282d2b9fdb1e Mon Sep 17 00:00:00 2001 From: Toks Date: Thu, 16 Jan 2014 19:42:17 -0500 Subject: [PATCH] fixes #688 --- app/logical/post_query_builder.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/app/logical/post_query_builder.rb b/app/logical/post_query_builder.rb index b75983497..a5c279fa5 100644 --- a/app/logical/post_query_builder.rb +++ b/app/logical/post_query_builder.rb @@ -340,6 +340,12 @@ class PostQueryBuilder when "favcount_asc" relation = relation.order("posts.fav_count ASC, posts.id DESC") + when "change", "change_desc" + relation = relation.order("posts.updated_at DESC, posts.id DESC") + + when "change_asc" + relation = relation.order("posts.updated_at ASC, posts.id DESC") + when "comment", "comm" relation = relation.order("posts.last_commented_at DESC NULLS LAST, posts.id DESC")