search for: course_offering_id

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

2007 Dec 04
0
a new model object associated with two parents
...the whole database to apply the transaction to? (I wasn''t clear on what the book meant me to use) def create_course_performances @pupils_to_add = Pupil.find(:all, :conditions => [“some_condition = "something" ] ) @course_offering = Course_offering.find_by_id(params[:course_offering_id] @pupils_to_add.each do |current_pupil| holder = Course_performance.new(:name => current_pupil.full_name ) Pupil.transaction do current_pupil.course_performances << holder @course_offering.course_performances << holder end...