我試着去弄清楚如何做:新手:activerecord加入?一些幫助將SQL語句的ActiveRecord
- 組 的has_many參與者
- 參與者 belongs_to的組
- 用戶 has_profile
- 輪廓 belongs_to的用戶
現在我試圖讓所有參加者從group.id ='1'和其中participant.profile.gender ='x'
這將如何轉換爲活動記錄?我已經挖掘了文檔,但不是一個sql大師,也不是一個AR大師。任何人都可以將我指向正確的方向?這對了解如何做到這一點非常有幫助。 困惑
是partecipants用戶還是個人檔案? – 2012-04-06 22:56:27
參與者是唯一的user_id group_id created_at updated_at基於user_id我抓住那裏配置文件,然後profile.gender – Rubytastic 2012-04-06 22:57:31