reltags: remove mark inactive button from artist urls.
In related tags, remove the (X) button next to artist urls for marking them as inactive. This was broken because it didn't record the change to the is_active flag in the artist history.
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -20,7 +20,6 @@
|
||||
<li>
|
||||
<% 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 %>
|
||||
<del><%= external_link_to url.url, truncate: 64, strip: :scheme, target: "_blank" %></del>
|
||||
<% end %>
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user