From b9ac595a1df6a2fdbc6c0c9b1fc60e0181ac065d Mon Sep 17 00:00:00 2001 From: Toks Date: Fri, 29 Nov 2013 17:48:02 -0500 Subject: [PATCH] fixes #2046 --- 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 8451413c2..e36a166f6 100644 --- a/app/logical/post_query_builder.rb +++ b/app/logical/post_query_builder.rb @@ -339,6 +339,9 @@ class PostQueryBuilder when "note_asc" relation = relation.order("posts.last_noted_at ASC, posts.id DESC").where("posts.last_noted_at is not null") + when "artcomm" + relation = relation.joins(:artist_commentary).order("artist_commentaries.updated_at DESC, 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.