Forum: Ruby on Rails Search by foreign key of foreign key

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Andrew (Guest)
on 2007-04-19 04:37

So far I can sort by foreign key.

 @section_pages, @sections = paginate :sections, :per_page => 20, :order
=> sort, :include => :title

But how do I sort by a foreign key of the foreign key.

I have "sections" which belong to "courses" which belong to "subjects".

I want to sort by "prefixes" which is in "subjects".

This topic is locked and can not be replied to.