Guest User

Untitled

a guest
Jul 17th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. I've got 3 tables: t1, t2 and t3. t1 belong_to t2 that
  2. belongs_to t3. I would like to link t1 to t3 using
  3. has_one through. In my t1 model, I've got "has_one
  4. :t3, :through => :t2" but when I'm doing my join on t3
  5. from t1, the joint is not right. Instead of having
  6. t1.fk_t2 = t2.id, I've got t1.id = t2.fk_t1 wich does
  7. not exist. Any idea?
  8.  
  9. t1 belongs_to t2
  10. t2 belongs_to t3
Add Comment
Please, Sign In to add comment