Hi, 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". Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---