Fix various rubocop warnings.

This commit is contained in:
evazion
2021-09-27 00:44:41 -05:00
parent a2a4ab887d
commit 79fdfa86ae
39 changed files with 149 additions and 154 deletions

View File

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