0
如何将此SQL转换为named_scope?此外,我希望总评论参数通过lambda传递。将SQL语句转换为named_scope?
“选择用户。,计数(),如从用户TOTAL_COMMENTS,评论,其中(users.id = comments.user_id)和(comments.public_comment = 1)和(comments.aasm_state = '发布')和( comments.forum_user_id为空)group by users.id having total_comments> 25“