假设我们有这样的事情:
class Group < ActiveRecord::Base
has_many :users
end
class User < ActiveRecord::Base
scope :have_more_than_X_posts, -> (x) { where('posts_count > ?', x) }
end
我希望能够拨打以下内容:Group.includes(users: {have_more_than_X_posts: 10})
想法?