Will_paginate destroys link_to_remote?!


I’ve got a list in a view and each of element of it has a link_to_remote
and everything worked like a charm. Now I added AJAX pagination and the
link_to_remote doesn’t work anymore.

This is the partial of the list:
<% for character in characters %>
<%= character.name %>
<%= link_to_remote t(’.add’), :url =>
add_character_activity_path(@activity), :method => :get %>
<% end %>
<%= will_paginate characters, :param_name => param_name %>

The add_character function in the controller is being called and doesn’t
throw any error but the only thing that is not working anymore is the
AJAX stuff in the add_character.rjs which is being called after the
function in the controller (of course):
page.replace_html “current_number”, @current_number

The current_number is not being updated anymore. All I did was that I
moved the <% for …%> from the view to a partial and added

Does anyone know why this is not working anymore?


How to post in this group?