pools: stop using the pool_string field (#4160).
Stop using the pool_string field internally, but keep maintaining it until we can drop it later. * Stop using the pool_string for `pool:<name>` metatag searches. * Stop using the pool_string in the `Post#pools` method. This is used to get the list of pools on post show pages.
This commit is contained in:
@@ -1020,11 +1020,7 @@ class Post < ApplicationRecord
|
||||
|
||||
module PoolMethods
|
||||
def pools
|
||||
@pools ||= begin
|
||||
return Pool.none if pool_string.blank?
|
||||
pool_ids = pool_string.scan(/\d+/)
|
||||
Pool.where(id: pool_ids).series_first
|
||||
end
|
||||
Pool.where("pools.post_ids && array[?]", id).series_first
|
||||
end
|
||||
|
||||
def has_active_pools?
|
||||
|
||||
Reference in New Issue
Block a user