Hi -

I'm trying to group records based on some attribute they or an
association of their's have. The simplest example I could think of to
drive my point is this:

Assume the following model associations (pardon my butchering of rails)
-

Faculty has_many :courses
Course belongs_to :faculty

I want to paginate courses based on the name of the faculty they belong
to.

The paging may look something like this (instead of page numbers):

# in the actual view

 << prev   Archeology Botanics ... |Math| ... Zoology   next >>

   # listing all courses of current page


I'd appreciate help on how to accomplish that. I know will_paginate does
numbering, but I couldn't figure out if it can do the above.
-- 
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@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to