will_paginate destroys link_to_remote?!

2 views
Skip to first unread message

Heinz Strunk

unread,
Jul 13, 2010, 6:34:49 AM7/13/10
to rubyonra...@googlegroups.com
Hello,

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
will_paginate.

Does anyone know why this is not working anymore?

Thanks
--
Posted via http://www.ruby-forum.com/.

chodee

unread,
Jul 13, 2010, 6:41:27 AM7/13/10
to Ruby on Rails: Talk

How to post in this group?

http://chozzhan.blogspot.com
Reply all
Reply to author
Forward
0 new messages