Pagination and AJAX

How does one do pagination with link_to_remote calls so the
pagination can be done with AJAX? For example, this obviously works
out of the box with the standard scaffold:

<%= link_to ‘Next page’, { :page => } if %>

to get users to the next page.

The tutorial at:
+Paginate+With+Ajax is helpful. The last solution at the bottom of
the page seems the best, but where would an image reference go? How
would I get to something like this:

<%= link_to_remote image_tag(‘
:size => ‘37x16’, :alt => ‘ADD’, :border => ‘0’),
:url => url_for(:controller => ‘image’, :action => :list),
:update => :images_list,
{ :page => @image_pages.current.previous } if %>

Is something like this really not possible? Please help if you have
solved this already. The solutions on that tutorial are not great.
And of course, I cannot find documentation for the :page option of
link_to anywhere.


Eric W.
Email: [email protected]

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs