[EMAIL PROTECTED] wrote:
> hi All,
>
> i wants to implement ajax pagination but i am facing a lot of
> problem , i found i lots of links on google but their is no
> explanation like what object we have to pass and condition can any
> body help me out in this concern pls i need your help as soon as
> possible
>
> thanks
> sachin
HI,
With normal pagination code in controller you can use this code to
perform pagination using Ajax.
In following code use proper action name from controller in
which you have done the pagination.
<%if @photo_pages.current.previous%>
<%= link_to_remote ("previous",
:url=>{:action=>params[:redirect_action], :page
=>@photo_pages.current.previous,:redirect_action=>params[:redirect_action],:id=>params[:id]})%>
<%end%>
<%if @photo_pages.current.next%>
<%= link_to_remote ("next", :url=>{:action=>params[:redirect_action],
:page =>
@photo_pages.current.next,:redirect_action=>params[:redirect_action],:id=>params[:id]})%>
<%end%>
Regards,
kiran
--
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
-~----------~----~----~----~------~----~------~--~---