私は2つのモデルを持っています
class User
has_many :cars
end
class Car
belongs_to :user
end
任意のユーザー属性を実行User.where(...)
およびテストできます
関係の属性をテストするにはどうすればよいですか? たとえば、私はやりたいです'get all users where user.car.color = green'
か?また'get all users which have more than two cars'