Maurício Linhares wrote: > Here's a simplification -> http://gist.github.com/129084 > > You're not using this sort_by "all" for anything in this code, why is > it in there? > > The named scope thing you'll see in the code is explained here - > http://ryandaigle.com/articles/2008/3/24/what-s-new-in-edge-rails-has-finder-functionality > > - > Maur�cio Linhares > http://codeshooter.wordpress.com/ | http://twitter.com/mauriciojr
Thanks mate. That is a good explanation link. My table has 120 records. What happens is when someone views the page, it's going to list 20 records with pagination for the other pages. They can click a link for "show all" and it lists the full 120 records. That's what the code above does. However, it doesn't sort by anything - perhaps I should have named it show_all. I was getting ready to put the sort information in there but I haven't gotten that far yet. I really just want the following things: A simplified page view showing 20 teams per page with the option to show all or go back to the simplified page view. In addition, I want all columns to be sortable (whether it's in the simplified view or the full page view. I like the code example you gave though. I'll look through it and mull it over. Please remember (for those helping me) some of what I might do might not make any sense at all (from a veteran perspective) but I'm still very newbish when it comes to all of this. I learn better as I dig deep into code and learn the nuances of it all. I'm still reading but reading only gets you partially there. -- 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

