linked banned artist listing

This commit is contained in:
albert
2011-10-16 22:35:19 -04:00
parent e507f3dfd1
commit 4ba4d0b088
4 changed files with 8 additions and 3 deletions

View File

@@ -179,8 +179,12 @@ class Artist < ActiveRecord::Base
post.delete!
end
tag_implication = TagImplication.create(:antecedent_name => name, :consequent_name => "banned_artist")
tag_implication.delay.process!
# potential race condition but unlikely
unless TagImplication.where(:antecedent_name => name, :consequent_name => "banned_artist").exists?
tag_implication = TagImplication.create(:antecedent_name => name, :consequent_name => "banned_artist")
tag_implication.delay.process!
end
update_column(:is_active, false)
update_column(:is_banned, true)
end

View File

@@ -1,6 +1,7 @@
<% content_for(:secondary_links) do %>
<menu>
<li><%= link_to "Listing", artists_path %></li>
<li><%= link_to "Banned", banned_artists_path %></li>
<li><%= link_to "Search", search_artists_path %></li>
<li><%= link_to "New", new_artist_path %></li>
<li><%= link_to "Recent changes", artist_versions_path %></li>