Rails 4 link_to Destroy not working in Getting Started tutorial

前端 未结 13 1138
野性不改
野性不改 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:22

    include below line in js

    //= require jquery_ujs
    

    include gem:

    gem 'jquery-rails'
    

    Destroy Link:

    <%= link_to "Logout", destroy_user_session_path %>
    

提交回复
热议问题