Rails 2 to Rails 3 : using link_to instead of link_to_remote (including remote and update)

前端 未结 2 1280
猫巷女王i
猫巷女王i 2020-12-06 07:06

A quick and easy answer I\'m sure. I\'m upgrading a Rails project from version 2 to version 3 and replacing a load of the link_to_remote with link_to\'s as per the Rails 3

2条回答
  •  甜味超标
    2020-12-06 07:41

    The :update parameter is gone. You need to handle the DOM update yourself using Unobtrusive JavaScript. Also, make sure you actually included the csrf_meta_tag helper in your layout.

    I wrote an article about using unobtrusive JavaScript in Rails 3.

提交回复
热议问题