app/models/studentdb/course.rb
def registrants
    @registrants ||= StudentRegistrationCourse.find(:all, 
                                        :conditions => ["regis_yr = ? AND regis_qtr = ? AND sln = ? AND 
                                                        (request_status = 'A' OR request_status = 'C' OR request_status = 'R')",
                                                        ts_year, ts_quarter, sln],
                                        :include => { :student_record => { 
                                                        :student_person => {
                                                          :service_learning_placements => :evaluation 
                                                          }
                                                        }
                                                      },
                                        :joins => :student_record,
                                        :order => "student_name" )
  end
# Returns an array of StudentRegistrationCourse records who are registered for this Course. We do this by searching through the
# registration_courses table and find any records that match this course and have a request_status of either A(dd), C(hange) or
# R(e-register).
Returns an array of StudentRegistrationCourse records who are registered for this Course. We do this by searching through the
registration_courses table and find any records that match this course and have a request_status of either A(dd), C(hange) or
R(e-register).
Returns an array of StudentRegistrationCourse records who are registered for this Course . We do this by searching through the registration_courses table and find any records that match this course and have a request_status of either A ( dd ) C ( hange ) or R ( e - register ) .
def registrants
    @registrants ||= StudentRegistrationCourse.find(:all, 
                                        :conditions => ["regis_yr = ? AND regis_qtr = ? AND sln = ? AND 
                                                        (request_status = 'A' OR request_status = 'C' OR request_status = 'R')",
                                                        ts_year, ts_quarter, sln],
                                        :include => { :student_record => { 
                                                        :student_person => {
                                                          :service_learning_placements => :evaluation 
                                                          }
                                                        }
                                                      },
                                        :joins => :student_record,
                                        :order => "student_name" )
  end
def registrants @registrants ||= StudentRegistrationCourse . find ( :all , :conditions => [ "regis_yr = ? AND regis_qtr = ? AND sln = ? AND 
                                                        (request_status = 'A' OR request_status = 'C' OR request_status = 'R')" , ts_year , ts_quarter , sln ] , :include => { :student_record => { :student_person => { :service_learning_placements => :evaluation } } } , :joins => :student_record , :order => "student_name" ) end
Returns an array of StudentRegistrationCourse records who are registered for this Course.
Returns an array of StudentRegistrationCourse records who are registered for this Course .