相关疑难解决方法(0)

Rails link_to销毁嵌套资源?

我有一个嵌套的资源附件,我想创建一个link_to销毁/删除附件.这就是我所拥有的,但它是作为GET而不是PUT发布的:

<%= link_to "Delete Attachment", project_thread_attachment_path(@attachment.thread.project.id, @attachment.thread.id, @attachment.id), :confirm => "Are you sure you want to delete this attachment?", :method => :delete, :action => "destroy" %>
Run Code Online (Sandbox Code Playgroud)

想法?谢谢!

ruby-on-rails ruby-on-rails-3

15
推荐指数
2
解决办法
1万
查看次数

标签 统计

ruby-on-rails ×1

ruby-on-rails-3 ×1