diff --git a/app/models/post.rb b/app/models/post.rb index bbbd4cca5..f095f3092 100644 --- a/app/models/post.rb +++ b/app/models/post.rb @@ -1051,12 +1051,12 @@ class Post < ApplicationRecord @pools ||= begin return Pool.none if pool_string.blank? pool_ids = pool_string.scan(/\d+/) - Pool.undeleted.where(id: pool_ids).series_first + Pool.where(id: pool_ids).series_first end end def has_active_pools? - pools.length > 0 + pools.undeleted.length > 0 end def belongs_to_pool?(pool) @@ -1101,7 +1101,7 @@ class Post < ApplicationRecord def set_pool_category_pseudo_tags self.pool_string = (pool_string.scan(/\S+/) - ["pool:series", "pool:collection"]).join(" ") - pool_categories = pools.select("category").map(&:category) + pool_categories = pools.undeleted.pluck(:category) if pool_categories.include?("series") self.pool_string = "#{pool_string} pool:series".strip end diff --git a/app/presenters/post_presenter.rb b/app/presenters/post_presenter.rb index 9e3af7ee1..5c3b8c347 100644 --- a/app/presenters/post_presenter.rb +++ b/app/presenters/post_presenter.rb @@ -189,7 +189,7 @@ class PostPresenter < Presenter end def has_nav_links?(template) - (CurrentUser.user.enable_sequential_post_navigation && template.params[:tags].present? && template.params[:tags] !~ /(?:^|\s)(?:order|ordfav|ordpool):/) || @post.pools.any? || @post.favorite_groups(active_id=template.params[:favgroup_id]).any? + (CurrentUser.user.enable_sequential_post_navigation && template.params[:tags].present? && template.params[:tags] !~ /(?:^|\s)(?:order|ordfav|ordpool):/) || @post.pools.undeleted.any? || @post.favorite_groups(active_id=template.params[:favgroup_id]).any? end def post_footer_for_pool_html(template) @@ -211,13 +211,13 @@ class PostPresenter < Presenter return if pool.nil? html += pool_link_html(template, pool, :include_rel => true) - other_pools = @post.pools.where("id <> ?", template.params[:pool_id]).series_first + other_pools = @post.pools.undeleted.where("id <> ?", template.params[:pool_id]).series_first other_pools.each do |other_pool| html += pool_link_html(template, other_pool) end else first = true - pools = @post.pools.series_first + pools = @post.pools.undeleted pools.each do |pool| if first && template.params[:tags].blank? && template.params[:favgroup_id].blank? html += pool_link_html(template, pool, :include_rel => true) diff --git a/app/views/moderator/post/queues/_post.html.erb b/app/views/moderator/post/queues/_post.html.erb index 91826bcc8..3369e8045 100644 --- a/app/views/moderator/post/queues/_post.html.erb +++ b/app/views/moderator/post/queues/_post.html.erb @@ -35,7 +35,7 @@