eliminate artist undelete action on controller

This commit is contained in:
Albert Yi
2018-06-05 13:16:28 -07:00
parent 52de1fb981
commit c1725f6dc0
3 changed files with 2 additions and 11 deletions

View File

@@ -74,14 +74,6 @@ class ArtistsController < ApplicationController
redirect_to(artist_path(@artist), :notice => "Artist deleted")
end
def undelete
if !@artist.deletable_by?(CurrentUser.user)
raise User::PrivilegeError
end
@artist.update_attribute(:is_active, true)
redirect_to(artist_path(@artist), :notice => "Artist undeleted")
end
def revert
@artist = Artist.find(params[:id])
@version = @artist.versions.find(params[:version_id])