I have a somewhat unusual set up of will_paginate like this:
http://www.railsontherun.com/2007/9/27/ajax-pagination-in-less-than-5-minutes
also I have an ajax based form_remote_tag that submits a keyword to the index page for searching. (it has to submit it to the index page and not some other action otherwise will_paginate breaks)
Ideally I'd like to have both the keyword submit and the pagination actions return via Ajax (by updating a particular div on the page) however the response method that I seem to have to use for will_paginate and for the keyword search seem to be incompatible.
For will_paginate to work correctly I have to do something like this:
render :update do |page| page.replace_html 'photos', :partial => "photos" end
for the keyword search to work correctly I have to do this
render :partial => 'photos', :collection => @photos
the render partial seems to break for will_paginate whereas render :update for the keyword search seems to return javascript on the page like this "try { "
I hope this isn't too confusing.
TIA,
GP