Files
danbooru/app/controllers/artist_versions_controller.rb
evazion e23f09235e artists: redact version histories of banned artists.
Fix names and urls of banned artists being visible in Google through
artist version pages.
2021-02-07 23:28:50 -06:00

19 lines
600 B
Ruby

class ArtistVersionsController < ApplicationController
respond_to :html, :xml, :json
def index
set_version_comparison
@artist_versions = authorize ArtistVersion.visible(CurrentUser.user).paginated_search(params)
@artist_versions = @artist_versions.includes(:updater, artist: :urls) if request.format.html?
respond_with(@artist_versions)
end
def show
@artist_version = ArtistVersion.find(params[:id])
respond_with(@artist_version) do |format|
format.html { redirect_to artist_versions_path(search: { artist_id: @artist_version.artist_id }) }
end
end
end