I’ve currently got 3 models: User, Lesson and Course
The associations are:
Lesson belongs_to Course
Course has_many Lessons
Course belongs_to User
User has_many Courses
Now I’m adding a new model for LessonCompletion, which will be
used to track which lessons the user has completed and when.
LessonCompletion belongs_to Lesson
LessonCompletion belongs_to User
User has_many LessonCompletions
Lesson has_many LessonCompletions
Now the way that this model (LessonCompletion) will be used is
on the Course show page in displaying which lessons are done.
My question is, should I add another association of LessonCompletion
Course has_many LessonCompletions or should I just go with
Course has_many LessonCompletions, :through => :lessons ?
The reason I ask is because I’m wondering if the :through will be very
taxing on the system as it will get used a lot.