search for: student_class_record

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

Did you mean: student_class_records
2005 Jul 28
0
ActiveRecord, computed values, and associations
Is there some sort of good pattern for dealing with computed values with Rails/ActiveRecord? A simple example: 3 tables, classes, students, and student_class_records (habtm style relation but contains a good deal of additional state so is modeled explicitly) Something like select the 10 classes with the most students. Easy enough in SQL. So I''m using a lot of find_by_sql and piggy-backing the computed values (number of students in this case). I a...