Topic: Converting rails 2 link_to_remote with :complete to rails 3

In my Rails 2.3 app I had a bunch of links like this:

<%= link_to_remote "show/hide, '#', :complete => visual_effect(:toggle_appear, "deck-"+deck.id.to_s)%>

Basically using a link to nowhere to use Rails-generated javascript effects. I realize this was probably never the ideal design, but what's the Rails 3 way to do something like this? I don't need to hit the server; I just need a link that kicks off a javascript toggle.

Last edited by admanb (2011-08-10 18:54:17)

Re: Converting rails 2 link_to_remote with :complete to rails 3

link_to_function was the answer.