简体   繁体   中英

Rails 3 upgrade link_to :remote :with options

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM