From 3e5cb612fea15cee2582473a2d8e3a0b36bfee96 Mon Sep 17 00:00:00 2001 From: Toks Date: Sat, 7 Dec 2013 21:41:09 -0500 Subject: [PATCH] add order:artcomm_asc --- app/logical/post_query_builder.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/logical/post_query_builder.rb b/app/logical/post_query_builder.rb index e36a166f6..eb2596537 100644 --- a/app/logical/post_query_builder.rb +++ b/app/logical/post_query_builder.rb @@ -342,6 +342,9 @@ class PostQueryBuilder when "artcomm" relation = relation.joins(:artist_commentary).order("artist_commentaries.updated_at DESC, posts.id DESC") + when "artcomm_asc" + relation = relation.joins(:artist_commentary).order("artist_commentaries.updated_at ASC, posts.id DESC") + when "mpixels", "mpixels_desc" # Use "w*h/1000000", even though "w*h" would give the same result, so this can use # the posts_mpixels index.