Displaying 1 result from an estimated 1 matches for "canteach".
Did you mean:
can_teach
2006 Aug 03
12
More than one has_many :through association between the same 2 models
...y Classes, right?. So I need a join model like
class Work < ActiveRecord::Base
belongs_to :teacher
belongs_to :class
end
But I also would like to know if a teacher CAN teach a class before I assign
him or her to one class. So I would like to have a new join model like
"CanTeach" :
class CanTeach< ActiveRecord::Base
belongs_to :teacher
belongs_to :class
end
The question is... can I do that? Because now the Teacher and Class Models
would look like...
class Teacher< ActiveRecord::Base
has_many :works
has_many :classes, :through...