Ruby on Rails Tuesday, June 1, 2010

On 1 June 2010 21:32, Matt Royer <lists@ruby-forum.com> wrote:
> Matt Royer wrote:
>> <% @orders.reverse.each do |order| %>

First off; rather than reversing the @orders; why don't you have the
finder that populates it order how you want? Seems like an extra,
redundant step to me.

> Nevermind. I know I should post this at one of the JS framework forums.
> Only posted here to see if there is any way to take care of the Rails
> side of things to cut down on the JS work.

Then for your scrolling; you could use the commonly-used Will Paginate
to return "pages" of five orders at a time. How you render the pages
(with funky JS fading, etc) is your concern; but it's not uncommon to
use RJS (or your own JS) to replace the content of a div with the
return from a controller.

--
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+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment