FIX: allow ordering for term-less queries
This commit is contained in:
parent
a3831a7003
commit
61ceaef4e5
|
@ -452,7 +452,7 @@ class Search
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
if @order == :latest || @term.blank?
|
if @order == :latest || (@term.blank? && !@order)
|
||||||
if opts[:aggregate_search]
|
if opts[:aggregate_search]
|
||||||
posts = posts.order("MAX(posts.created_at) DESC")
|
posts = posts.order("MAX(posts.created_at) DESC")
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue