Ajax Pagination Problem

Vipin Vm
Thu, 21 Aug 2008 09:17:10 -0000

Hi All,

Am Using will_paginate with lowpro
(http://railsontherun.com/2007/9/27/ajax-pagination-in-less-than-5-minutes).
It works fine. My problem is, am using ajax methods for add, edit,
update and delete. When i click "« Previous 1 2 Next »" it calls the
last method call.

For ie i have 13 records in my table (10 records in 1st page and 3 in
2nd page). If i add 1 new record (using ajax), it added nicely (Total 14
records). but if i click paginator link (2 or Next), it calls the same
add method and add a duplicate of the last record (Total 15 records).

The delete operation is also working fine (delete record id = 7), then
if i click paginator link it shows an error in firebug that there is no
such entry with id 7. (it calls the previous delete method again)

Is there any way to solve this?

Thanks in advance,

Vipin
--
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
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
-~----------~----~----~----~------~----~------~--~---