Files
danbooru/app/controllers/note_versions_controller.rb
evazion 2aac42b112 Add show actions for note, artist, artist commentary versions.
Add these endpoints:

* /note_versions/1234
* /artist_versions/1234
* /artist_commentary_versions/1234

This is so the /ip_addresses listing can link to these endpoints.
2019-11-11 12:56:39 -06:00

17 lines
495 B
Ruby

class NoteVersionsController < ApplicationController
respond_to :html, :xml, :json
def index
@note_versions = NoteVersion.paginated_search(params)
@note_versions = @note_versions.includes(:updater) if request.format.html?
respond_with(@note_versions)
end
def show
@note_version = NoteVersion.find(params[:id])
respond_with(@note_version) do |format|
format.html { redirect_to note_versions_path(search: { note_id: @note_version.note_id }) }
end
end
end