From 61ceaef4e53f82996937f23517fbf119369dcfeb Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 21 Sep 2015 07:59:52 +1000 Subject: [PATCH] FIX: allow ordering for term-less queries --- lib/search.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/search.rb b/lib/search.rb index 248948219..6811a98be 100644 --- a/lib/search.rb +++ b/lib/search.rb @@ -452,7 +452,7 @@ class Search end - if @order == :latest || @term.blank? + if @order == :latest || (@term.blank? && !@order) if opts[:aggregate_search] posts = posts.order("MAX(posts.created_at) DESC") else