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:
@@ -2,7 +2,7 @@ class NoteVersionsController < ApplicationController
|
||||
respond_to :html, :xml, :json
|
||||
|
||||
def index
|
||||
@note_versions = NoteVersion.search(params[:search]).order("note_versions.id desc").paginate(params[:page], :limit => params[:limit])
|
||||
@note_versions = NoteVersion.search(params[:search]).paginate(params[:page], :limit => params[:limit])
|
||||
respond_with(@note_versions) do |format|
|
||||
format.html { @note_versions = @note_versions.includes(:updater) }
|
||||
format.xml do
|
||||
|
||||
Reference in New Issue
Block a user