My model reads as so :
class Registration < ActiveRecord::Base
has_many :registered_courses
has_many :courses, through: :registered_courses
has_many :sections, through: :courses
The problem is that if many different Registration
's have the same Course
. When I write something like :
Registration.find(x).sections
It returns sections from any registration with the same Course.
But what I really want is all sections only from that specific registration. That is, even if other Registrations are using the same Course.