我正在使用Rails 3,我有一个link_to方法:delete,但是当我点击这个链接时,它会转到show动作而不是destroy动作.
我的问题是如何解决这个问题?
提前致谢.
码: <%= link_to 'Delete', list_path(@list.id), :method => :delete, :confirm => 'Are you sure?' %>
<%= link_to 'Delete', list_path(@list.id), :method => :delete, :confirm => 'Are you sure?' %>
ruby-on-rails-3
ruby-on-rails-3 ×1