标签: ruby-on-rails activerecord join ruby-on-rails-3 one-to-one
我有以下型号
class User < ActiveRecord::Base has_many :assignments has_many :roles, :through => :assignments has_one :profile end
我如何进行活动记录查询以选择具有特定角色的用户的个人资料?
答案 0 :(得分:0)
.includes(:relation)可能有用
.includes(:relation)