Hey I have a DB Model with the following tables
users, courses, users_courses and coursecategories
users <1:n> users_courses <n:1> courses <n:1>
I have the models set up and they sheem to work.
I can do something like this
user_courses = User.find_by_id(1).courses (resolves the n:m relation and returns the right course objects)
What i need is something like this:
user_categories = User.find_by_id(1).courses.coursecategorie (doesn't work)
I want to query all the categories a user has courses in.
How do i do that?
thx