views:

1324

answers:

2

Is there a rails plugin that will do alphabetical pagination/navigation?

I have a very large data set and would prefer something that gave users a more direct navigation cue in addition to 1..2...3...4...5 pagination.

I could code it myself but was wondering if there was a decent plugin out there already that would do it for me.

+1  A: 
Denis Hennessy
Cool. Just what I was looking for. I'll give it a whirl.
srboisvert
+2  A: 

Why can you not have the alphabet for which you want to see the results to, passed as a parameter? And then paginate on the results? That is,

# show results of params[:alphabet] alphabet
@results = fetch_results(params[:alphabet]) 
# Use Will Paginate to fetch results internally and give a condition that 
# fetches results starting with the passed alphabet.

And show paginated results (numbered) using <%= will_paginate @results %> on the view.

Chirantan
This is what I expect I'll ultimately do since the data set is so large that it will need pagination within each letter's results.
srboisvert