linked banned artist listing
This commit is contained in:
@@ -179,8 +179,12 @@ class Artist < ActiveRecord::Base
|
|||||||
post.delete!
|
post.delete!
|
||||||
end
|
end
|
||||||
|
|
||||||
tag_implication = TagImplication.create(:antecedent_name => name, :consequent_name => "banned_artist")
|
# potential race condition but unlikely
|
||||||
tag_implication.delay.process!
|
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_active, false)
|
||||||
update_column(:is_banned, true)
|
update_column(:is_banned, true)
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
<% content_for(:secondary_links) do %>
|
<% content_for(:secondary_links) do %>
|
||||||
<menu>
|
<menu>
|
||||||
<li><%= link_to "Listing", artists_path %></li>
|
<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 "Search", search_artists_path %></li>
|
||||||
<li><%= link_to "New", new_artist_path %></li>
|
<li><%= link_to "New", new_artist_path %></li>
|
||||||
<li><%= link_to "Recent changes", artist_versions_path %></li>
|
<li><%= link_to "Recent changes", artist_versions_path %></li>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Factory.define(:pool) do |f|
|
Factory.define(:pool) do |f|
|
||||||
f.name {Faker::Name.first_name}
|
f.name {(rand(1_000_000) + 100).to_s}
|
||||||
f.creator {|x| x.association(:user)}
|
f.creator {|x| x.association(:user)}
|
||||||
f.description {Faker::Lorem.sentences}
|
f.description {Faker::Lorem.sentences}
|
||||||
end
|
end
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 89 KiB |
Reference in New Issue
Block a user