1
마지막 날에 포지션이있는 스킬을 구독하는 사용자를 어떻게 찾을 수 있습니까?조인 모델을 통해 속성을 찾는 방법은 무엇입니까?
나는 소원 I 수 : User.find (모두) .where.skills.positions ('created_at>?', Time.now - 1.day)
Company
has_many :positions
has_many :skills, :through => :positions
Position
belongs_to :company
belongs_to :skill
Skill
has_many :positions
has_many :companies, :through => :positions
has_many :subscriptions
has_many :users, :through => :subscriptions
Subscription
belongs_to :skill
belongs_to :user
User
has_many :subscriptions
has_many :skills, :through => :subscriptions
감사합니다. 그것은 작동합니다. 나는 "include ({: skills => : positions}"에 대해 더 많이 배워야한다. –