post sets: refactor pool/favgroup methods.
Eliminate the `has_pool?` and `pool_name` methods in favor of the `pool` method. Likewise for favgroups.
This commit is contained in:
@@ -30,9 +30,9 @@
|
||||
<li><%= link_to "Artist", artist_path(@post_set.artist), :id => "show-excerpt-link" %></li>
|
||||
<% elsif @post_set.wiki_page.present? %>
|
||||
<li><%= link_to "Wiki", wiki_page_path(@post_set.wiki_page), :id => "show-excerpt-link" %></li>
|
||||
<% elsif @post_set.has_pool? %>
|
||||
<% elsif @post_set.pool.present? %>
|
||||
<li><%= link_to "Pool", pool_path(@post_set.pool), :id => "show-excerpt-link" %></li>
|
||||
<% elsif @post_set.has_favgroup? %>
|
||||
<% elsif @post_set.favgroup.present? %>
|
||||
<li><%= link_to "Favorite Group", favorite_group_path(@post_set.favgroup), :id => "show-excerpt-link" %></li>
|
||||
<% elsif @post_set.has_blank_wiki? %>
|
||||
<li><%= link_to "Wiki", new_wiki_page_path(wiki_page: { title: @post_set.tag_string }), id: "show-excerpt-link" %></li>
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
</p>
|
||||
</div>
|
||||
<% end %>
|
||||
<% elsif post_set.has_pool? %>
|
||||
<% elsif post_set.pool.present? %>
|
||||
<% post_set.pool.tap do |pool| %>
|
||||
<h4>
|
||||
<%= pool.pretty_category %>:
|
||||
@@ -54,7 +54,7 @@
|
||||
<%= link_to "View pool", pool_path(post_set.pool.id) %>
|
||||
</p>
|
||||
<% end %>
|
||||
<% elsif post_set.has_favgroup? %>
|
||||
<% elsif post_set.favgroup.present? %>
|
||||
<h4>
|
||||
Favorite Group:
|
||||
<%= link_to post_set.favgroup.pretty_name, favorite_group_path(post_set.favgroup) %>
|
||||
|
||||
Reference in New Issue
Block a user