Post#expunge!: fix remove_from_all_pools to clear deleted pools.
* Change Post#pools to return all pools, including deleted pools. This fixes remove_all_from_pools to remove the post from deleted pools too. * Change other users of Post#pools to explicitly select undeleted pools.
This commit is contained in:
@@ -35,7 +35,7 @@
|
||||
</li>
|
||||
<li><strong>Source</strong>: <%= post.source %></li>
|
||||
<% if post.has_active_pools? %>
|
||||
<li><strong>Pools</strong>: <%= render "pools/inline_list", pools: post.pools %></li>
|
||||
<li><strong>Pools</strong>: <%= render "pools/inline_list", pools: post.pools.undeleted %></li>
|
||||
<% end %>
|
||||
<li><strong>Tags</strong>: <%= post.presenter.inline_tag_list_html(self) %></li>
|
||||
</ul>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<%= render "posts/partials/show/search_seq", :post => post %>
|
||||
<% end %>
|
||||
|
||||
<% if post.pools.any? %>
|
||||
<% if post.pools.undeleted.any? %>
|
||||
<%= render "posts/partials/show/pools", :post => post %>
|
||||
<% end %>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user