/wiki_pages: sort autocomplete by post count.
* Add search[order]=post_count param to /wiki_pages. * Make autocomplete do a prefix match ordered by post count, so that it works the same way that tag autocomplete does elsewhere.
This commit is contained in:
@@ -15,7 +15,7 @@ class WikiPagesController < ApplicationController
|
||||
end
|
||||
|
||||
def index
|
||||
@wiki_pages = WikiPage.search(params[:search]).order("updated_at desc").paginate(params[:page], :limit => params[:limit], :search_count => params[:search])
|
||||
@wiki_pages = WikiPage.search(params[:search]).paginate(params[:page], :limit => params[:limit], :search_count => params[:search])
|
||||
respond_with(@wiki_pages) do |format|
|
||||
format.html do
|
||||
if params[:page].nil? || params[:page].to_i == 1
|
||||
|
||||
Reference in New Issue
Block a user