ruby - rails3 link_to :method => :delete,:confirm=>"are you srue?" 不起作用是为什么?
黄舟
黄舟 2017-04-21 10:56:02
0
2
717

如下 代码:

ink_to :Delete,{:action => :delete,:obj_id => obj_id,:table =>params[:table]},:class => "negative button",:method => :delete,:confirm => "are you sure Delte #{params[:table]}: #{obj_id} ?"

在rails2.X中当我点击 这个链接的时候会弹出一个提醒框,然后升级到rails 3.2中就不好使了。这个是为什么?有什么解决的方法吗?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(2)
阿神

Need to import some js files
Introduce "jquery-ujs.js" into application.html.erb

PHPzhong

It is recommended to enable javascript script debugging such as firebug in the browser to find out whether there is an error in some front-end code that prevents the function from executing properly.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!