link_to :confirm displays popup twice

后端 未结 16 1901
感情败类
感情败类 2020-11-30 02:38

This tag with rails 3

<%= link_to \'Destroy\', item, :method => :delete,:confirm=>\'Are you sure?\' %>

produces this html

16条回答
  •  既然无缘
    2020-11-30 03:19

    I was having this same issue, and spent the better part of an hour looking into it. I found a solution in my situation, and I figured I would share it in case it helps...

    My problem was that I had

    config.assets.debug = true 
    

    in config/environments/development.rb

    Changing that line to

    config.assets.debug = false
    

    fixed the confirmation duplication for me. I found the relevant information in this rails guide to asset pipeline. Hope it helps!

提交回复
热议问题