Will Paginate

Hi,

I installed the will_paginate plugin and i used the coding below:

#controller

def show_tags
@tags = Tag.find(:all,:conditions => ['name LIKE ?',
'%A']).paginate(:per_page=>10, :page=>params[:page])
end

View show_tag
<div id="reg_data">
  <%= render :partial => 'tags/registry_tags' %>
</div>

<%=will_paginate @tags ,:params => { :controller => 'tags', :action =>
'update_tags'}%>

view tags/registry_tags

<%@tags.each do|tag|%>
<div id="reg_row">
  <div id="cbox">
   <input type="checkbox">
  </div>
<%= tag.name%>
</div>
<%end%>

When i click on the will paginates, "Prev-next-1,2,...", it goes to the
the controller side

def update_tags
render :update do |page|
   page.replace_html "reg_data",:partial=>"tags/registry_tags"
end
end

My problem is the div is not getting updated, like the way, a
link_to_remote would have worked. I am able to see all the div commands
and the expected data in a simple white screen after the second
pagination click. Am i missing a simple coding here?
Please help !!!

My problem is the div is not getting updated, like the way, a
link_to_remote would have worked. I am able to see all the div commands
and the expected data in a simple white screen after the second
pagination click. Am i missing a simple coding here?
Please help !!!

will_paginate doesn't generate ajax links by default. You can write a
custom link renderer that does however (I think there are a few
examples floating around of how to do this)

Fred