Ruby on Rails Tuesday, June 1, 2010

Michael Pavling wrote:
> 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.

Thank you very much for the tip! I'm still getting the hang of Rails and
Ruby. It was a way that worked quickly for me, but your way makes a lot
more sense.

> 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.

Perfect! Thank you very much. I've been working on this problem forever.
Honestly had no idea how to achieve that functionality. I mainly wanted
5 items at a time. Didn't really care how I got there (thought JS would
be the quickest, that's why I posted this), so thank you very much for
the solution!

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

No comments:

Post a Comment