0

我有以下型号

class User < ActiveRecord::Base
  has_many :assignments
  has_many :roles, :through => :assignments
  has_one :profile
end

我将如何做和主动记录查询来选择具有特定角色的用户的个人资料?

4

1 回答 1

0

.includes(:relation)可能有用

于 2010-12-22T02:43:56.393 回答