Fix various rubocop warnings.
This commit is contained in:
@@ -178,7 +178,7 @@ class Pool < ApplicationRecord
|
||||
# XXX unify with PostQueryBuilder ordpool search
|
||||
def posts
|
||||
pool_posts = Pool.where(id: id).joins("CROSS JOIN unnest(pools.post_ids) WITH ORDINALITY AS row(post_id, pool_index)").select(:post_id, :pool_index)
|
||||
posts = Post.joins("JOIN (#{pool_posts.to_sql}) pool_posts ON pool_posts.post_id = posts.id").order("pool_posts.pool_index ASC")
|
||||
Post.joins("JOIN (#{pool_posts.to_sql}) pool_posts ON pool_posts.post_id = posts.id").order("pool_posts.pool_index ASC")
|
||||
end
|
||||
|
||||
def synchronize
|
||||
|
||||
Reference in New Issue
Block a user