Rails 4 link_to Destroy not working in Getting Started tutorial

前端 未结 13 1115
野性不改
野性不改 2020-11-27 04:48

I am working through the Getting Started tutorial (creating a Blog) and the link_to Destroy is not functioning properly. In the terminal it always interprets it as #SHOW. <

13条回答
  •  庸人自扰
    2020-11-27 05:43

    Using the button_to method instead of link_to seemed to work, minus the fact that it was not confirming(which I felt was important).

    In my case, I was using react-on-rails and had multiple layouts.

    Adding <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> to my hello-world layout fixed the problem.

提交回复
热议问题