This commit is contained in:
Albert Yi
2018-06-05 14:40:55 -07:00
parent 2ec9aad320
commit c75f520055
7 changed files with 67 additions and 10 deletions

View File

@@ -0,0 +1,18 @@
class ArtistUrlsController < ApplicationController
respond_to :json
before_action :member_only
def update
@artist_url = ArtistUrl.find(params[:id])
@artist_url.update(artist_url_params)
respond_with(@artist_url)
end
private
def artist_url_params
permitted_params = %i[is_active]
params.fetch(:artist_url, {}).permit(permitted_params)
end
end

View File

@@ -1,5 +1,5 @@
class ArtistsController < ApplicationController
respond_to :html, :xml, :json
respond_to :html, :xml, :json, :js
before_action :member_only, :except => [:index, :show, :show_or_new, :banned]
before_action :builder_only, :only => [:destroy]
before_action :admin_only, :only => [:ban, :unban]