rails scaffold销毁记录,销毁设备会话

时间:2011-10-27 04:10:49

标签: ruby-on-rails ruby-on-rails-3.1 device

当我使用销毁记录

<%= link_to 'Destroy', test, confirm: 'Are you sure?', :method=>"delete" %>

会话设备也被破坏了,为什么?

我使用的是rails 3.1.1

耙路线 脚手架测试

test GET    /test(.:format) {:action=>"index", :controller=>"tests"}
POST   /tests(.:format){:action=>"create", :controller=>"tests"}
new_test GET    /test/new(.:format){:action=>"new", :controller=>"tests"}
edit_test GET    /test/:id/edit(.:format) {:action=>"edit", :controller=>"tests"}
test GET    /test/:id(.:format){:action=>"show", :controller=>"tests"}

设计路线

new_user_session GET /users/login(.:format){:action=>"new", :controller=>"devise/sessions"}                                                         
user_session POST   /users/login(.:format){:action=>"create",controller=>"devise/sessions"}                                                      
destroy_user_session GET /users/sign_out(.:format){:action=>"destroy",:controller=>"devise/sessions"}                                                     
 user_password POST /users/password(.:format) {:action=>"create",:controller=>"devise/passwords"}                                                     
 new_user_password GET    /users/password/new(.:format){:action=>"new", :controller=>"devise/passwords"}
edit_user_password GET    /users/password/edit(.:format){:action=>"edit", :controller=>"devise/passwords"}
PUT    /users/password(.:format){:action=>"update", :controller=>"devise/passwords"}

0 个答案:

没有答案