Rails 3 :method=> :delete doesn't work in Internet Explorer

前端 未结 11 872
天涯浪人
天涯浪人 2020-12-09 00:44

I am going through the rails 3 tutorial at railstutorial.org. I have just created an extremely simple scaffold Users.

The scaffold-generated destroy link does not wo

11条回答
  •  隐瞒了意图╮
    2020-12-09 00:52

    This is probably because the loading of your script (rails.js and/or application.js) happens in head. At script execution time, there are no elements in your DOM with the attributes data-confirm and data-method.

    So, the solution is to move the javascript tag to the end of . At this time, the DOM has most likely been loaded and the javascript will find your elements.

提交回复
热议问题