FIX: allow ordering for term-less queries

This commit is contained in:
Sam 2015-09-21 07:59:52 +10:00
parent a3831a7003
commit 61ceaef4e5

View file

@ -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