ruby -- 问题解决(六)link_to to destroy not working

在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://*.com/questions/4606860/rails-3-link-to-to-destroy-not-working

上一篇:Xamarin自定义布局系列——支持无限滚动的自动轮播视图CarouselView


下一篇:浩哥解析MyBatis源码(四)——DataSource数据源模块