Translations of this page?:

Discussion

horace Lee, 2009/03/22 02:04

yeah, I see the different. If you want to through, then that table must have some relation

class Student < ActiveRecord::Base

has_many :degree_plans
has_many :courses, :through => :degree_plans

end class Course < ActiveRecord::Base

has_many :degree_plans
has_many :students, :through => :degree_plans
Siddhart Ravichandran, 2009/03/29 15:51

How does the value get entered into the join table. I have a simiar example set up but my join table never gets populated. I fail to understand why?

 
howtos/db-relationships/basic.txt · Last modified: 2010/11/05 06:01 by n8sql
 
Recent changes RSS feed Creative Commons License