Move all order logic to models

- Have a default order for each model
-- The overall default is ID DESC
- Allow for custom orderings
-- When comma-separated IDs are used
This commit is contained in:
BrokenEagle
2018-01-28 20:46:18 -08:00
parent f83480cc8a
commit d829ab3a00
49 changed files with 134 additions and 116 deletions

View File

@@ -2,7 +2,7 @@ class WikiPageVersionsController < ApplicationController
respond_to :html, :xml, :json
def index
@wiki_page_versions = WikiPageVersion.search(params[:search]).order("id desc").paginate(params[:page], :limit => params[:limit], :search_count => params[:search])
@wiki_page_versions = WikiPageVersion.search(params[:search]).paginate(params[:page], :limit => params[:limit], :search_count => params[:search])
respond_with(@wiki_page_versions) do |format|
format.xml do
render :xml => @wiki_page_versions.to_xml(:root => "wiki-page-versions")