diff --git a/app/controllers/artist_urls_controller.rb b/app/controllers/artist_urls_controller.rb index 56bbec746..0c7ec5a8a 100644 --- a/app/controllers/artist_urls_controller.rb +++ b/app/controllers/artist_urls_controller.rb @@ -1,6 +1,5 @@ class ArtistUrlsController < ApplicationController respond_to :js, :json, :xml, :html - before_action :member_only, except: [:index] def index @artist_urls = ArtistUrl.paginated_search(params) @@ -8,18 +7,4 @@ class ArtistUrlsController < ApplicationController respond_with(@artist_urls) end - - 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 diff --git a/app/views/related_tags/_source_tags.html.erb b/app/views/related_tags/_source_tags.html.erb index 752a13679..cdc307b9a 100644 --- a/app/views/related_tags/_source_tags.html.erb +++ b/app/views/related_tags/_source_tags.html.erb @@ -20,7 +20,6 @@
  • <% if url.is_active %> <%= external_link_to url.url, truncate: 64, strip: :scheme, target: "_blank" %> - <%= link_to tag.i(class: "fas fa-minus-circle"), artist_url_path(id: url.id, artist_url: { is_active: false }), remote: true, method: :put, "data-confirm": "This will mark the URL as inactive. Continue?" %> <% else %> <%= external_link_to url.url, truncate: 64, strip: :scheme, target: "_blank" %> <% end %> diff --git a/config/routes.rb b/config/routes.rb index 34b8968fd..a99d0a43f 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -63,7 +63,7 @@ Rails.application.routes.draw do get :banned end end - resources :artist_urls, only: [:index, :update] + resources :artist_urls, only: [:index] resources :artist_versions, :only => [:index, :show] do collection do get :search