artists: replace /artists/banned endpoint with simple search.

This commit is contained in:
evazion
2019-11-04 17:15:02 -06:00
parent db01696e91
commit c1939f78d6
2 changed files with 2 additions and 10 deletions

View File

@@ -15,15 +15,7 @@ class ArtistsController < ApplicationController
end
def banned
@artists = Artist.where("is_banned = ?", true).order("name")
respond_with(@artists) do |format|
format.xml do
render :xml => @artists.to_xml(:include => [:urls], :root => "artists")
end
format.json do
render :json => @artists.to_json(:include => [:urls])
end
end
redirect_to artists_path(search: { is_banned: "true", order: "updated_at" })
end
def ban

View File

@@ -1,7 +1,7 @@
<% content_for(:secondary_links) do %>
<%= quick_search_form_for(:any_name_or_url_matches, artists_path, "artists", autocomplete: "artist") %>
<%= subnav_link_to "Listing", artists_path %>
<%= subnav_link_to "Banned", banned_artists_path %>
<%= subnav_link_to "Banned", artists_path(search: { is_banned: "true", order: "updated_at" }) %>
<% if CurrentUser.is_member? %>
<%= subnav_link_to "New", new_artist_path %>
<% end %>