mirror of
https://github.com/tildeverse/lobsters
synced 2024-06-14 21:16:37 +00:00
use memoized field
This commit is contained in:
parent
c80aa2e1fa
commit
7e02d74503
|
@ -27,6 +27,7 @@ class ModController < ApplicationController
|
|||
@title = "Flagged Comments"
|
||||
@comments = period(Comment
|
||||
.eager_load(:user, :hat, :story => :user, :votes => :user)
|
||||
.where("comments.flags >= 2")
|
||||
.where("(select count(*) from votes where
|
||||
votes.comment_id = comments.id and
|
||||
vote < 0 and
|
||||
|
|
Loading…
Reference in New Issue
Block a user