Displaying 1 result from an estimated 1 matches for "course_dates".
2006 Feb 20
0
No Magic for HABTM forms?
...omeone shows me that there is a simpler way.
The Database Model:
class Registration < ActiveRecord::Base
has_and_belongs_to_many :people
has_and_belongs_to_many :scheduled_courses
end
class ScheduledCourse < ActiveRecord::Base
belongs_to :course
belongs_to :teacher
has_many :course_dates
belongs_to :location
has_and_belongs_to_many :registrations
end
class Person < ActiveRecord::Base
has_and_belongs_to_many :registrations
end
What I needed was to have one registration form web page that a user
fills out to register for a scheduled_course. The courses will have
TWO...