在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
在Rails的development环境下开发时,使用link_to进行destroy时顺利进行,最近将环境配置成production时,使用link_to,结果not working 代码如下: <%= link_to 'Delete User', @user, :confirm => "Are you sure you want to delete?", :method => :delete, :class => "btn btn-danger %> 解决方法如下:将link_to 改为 button_to <%= button_to 'Delete User', @user, :confirm => "Are you sure you want to delete?", :method => :delete, :class => "btn btn-danger %> 参考链接:http://stackoverflow.com/questions/4606860/rails-3-link-to-to-destroy-not-working |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论