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:
evazion
2017-07-20 21:00:13 -05:00
parent bac8ff4de0
commit 1b310dcc0b
4 changed files with 8 additions and 8 deletions

View File

@@ -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>

View File

@@ -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 %>