嘿,伙计们,我不知道该怎么说,我做了一点 ror..我把我所有的工作都改成了新的一圈,我赢了 7,我的大多数项目都使用 ror 3.2.11...问题是当我这样做的时候
<%= link_to("Delete", user, :method => :delete, :confirm => "Are you sure that you want to delete this user") %>
它呈现为
<a href="/users/1" data-confirm="Are you sure that you want to delete this user" data-method="destroy" rel="nofollow">Delete</a>
但是当我单击此链接时,它实际上会发出一个获取请求,这里是服务器日志
Started GET "/users/3" for 127.0.0.1 at 2013-03-20 06:21:40 +0530
Processing by UsersController#show as HTML
Parameters: {"id"=>"3"}
User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "3"]]
Rendered users/show.html.erb within layouts/application (0.0ms)
Rendered layouts/_header.html.erb (2.0ms)
User Load (0.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1
Rendered layouts/_body.html.erb (2.0ms)
Rendered layouts/_footer.html.erb (0.0ms)
Completed 200 OK in 19ms (Views: 19.0ms | ActiveRecord: 0.0ms)