Web开发敏捷之道P81页的delete错误:
原文代码:
<%= link_to 'Destroy', { :action => 'destroy', :id => product },
:confirm => "Are you sure?",
:method => :post %>
代码删除是不能实现的。
正确的代码应该是:
<%= link_to 'Destroy', { :action => 'destroy', :id => product },
:confirm => "Are you sure?",
:method => :delete %>
原文代码:
<%= link_to 'Destroy', { :action => 'destroy', :id => product },
:confirm => "Are you sure?",
:method => :post %>
代码删除是不能实现的。
正确的代码应该是:
<%= link_to 'Destroy', { :action => 'destroy', :id => product },
:confirm => "Are you sure?",
:method => :delete %>