Over a million developers have joined DZone.

Simple Ajax Paging

·
<% if @lesson_pages.current.previous -%>
  <%= link_to_remote 'Previous page', 
    :url  => { :page => @lesson_pages.current.previous },
    :update  => 'my_div',
    :loading => "Toggle.display('spinner');"
  %>
<% end -%>

This assumes that your paging links are inside the DIV that is being replaced by the Ajax call.

I'll leave 'next' as an exercise for the reader.
Topics:

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}