search for: courserequisite

Displaying 1 result from an estimated 1 matches for "courserequisite".

2006 Apr 05
4
Self-referential join creation/deletion and :through
Greetings. First, this example is just my way of exploring :through. It probably doesn''t need has_many :through, and could just use a standard HABTM association. Here''s the models: class CourseRequisite < ActiveRecord::Base belongs_to :requisite, :class_name => ''Course'', :foreign_key => ''requisite_id'' belongs_to :course, :class_name => ''Course'', :foreign_key => ''corse_id'' end class Course < ActiveRecor...