Files
danbooru/app/controllers/artist_commentary_versions_controller.rb
BrokenEagle d829ab3a00 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
2018-01-29 11:42:53 -08:00

13 lines
424 B
Ruby

class ArtistCommentaryVersionsController < ApplicationController
respond_to :html, :xml, :json
def index
@commentary_versions = ArtistCommentaryVersion.search(params[:search]).paginate(params[:page], :limit => params[:limit])
respond_with(@commentary_versions) do |format|
format.xml do
render :xml => @commentary_versions.to_xml(:root => "artist-commentary-versions")
end
end
end
end