search for: current_pupil

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

2007 Dec 04
0
a new model object associated with two parents
...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 end end Thanks in advance for any tips. -...