- The types are: -- Previous: The default and the previously used type -- Subsequent: Compares against the next version -- Current: Compares against the current version - Allow switching between comparison types in index and diff views -- Have links vary depending upon current comparison type
19 lines
523 B
Ruby
19 lines
523 B
Ruby
class NoteVersionsController < ApplicationController
|
|
respond_to :html, :xml, :json
|
|
|
|
def index
|
|
set_version_comparison
|
|
@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
|