0

I'm upgrading to Rails 3, and replacing all my link_to_remote calls with link_to(..., :remote => true). However, I'm trying to figure out how to implement the :with option in Rails 3. The :with option is a way to supply a on-the-fly query param using javascript variables.

Any help would be appreciated, thanks.

Ngan
  • 377
  • 2
  • 11

1 Answers1

0

I think it has been removed from Rails 3, as it goes against the principle of non-obstrusive javascript.

So, you should try to find another way to achieve whatever you want....

Take a look here: http://railscasts.com/episodes/205-unobtrusive-javascript?view=asciicast

gabrielhilal
  • 10,660
  • 6
  • 54
  • 81
  • Right, I've looked at all those resources, but none of them really tells me how to carry over the :with concept... – Ngan Jul 02 '12 at 20:31
  • 1
    A good example of how approach in an unobtrusively way can be found [here](http://stackoverflow.com/questions/4292508/link-to-with-jquery-params-in-rails) – gabrielhilal Jul 02 '12 at 21:54
  • I guess there's no convention, everything is just custom...Thanks! – Ngan Jul 03 '12 at 21:17