2011-12-07 58 views
0

destroy_user_session雖然routes.rb配置設計沒有destroy_user_session路線

# routes.rb # 
devise_for :users, :controllers => { :omniauth_callbacks => "users/omniauth_callbacks" } 
root :to => 'home#home' 

和耙給

$ rake routes 

user_omniauth_callback  /users/auth/:action/callback(.:format) {:action=>/facebook/, :controller=>"users/omniauth_callbacks"} 
        root  /         {:controller=>"home", :action=>"home"} 
       events GET /events(.:format)      {:action=>"index", :controller=>"events"} 
         POST /events(.:format)      {:action=>"create", :controller=>"events"} 
      new_event GET /events/new(.:format)     {:action=>"new", :controller=>"events"} 
      edit_event GET /events/:id/edit(.:format)    {:action=>"edit", :controller=>"events"} 
       event GET /events/:id(.:format)     {:action=>"show", :controller=>"events"} 
         PUT /events/:id(.:format)     {:action=>"update", :controller=>"events"} 
         DELETE /events/:id(.:format)     {:action=>"destroy", :controller=>"events"} 
       users GET /users(.:format)      {:action=>"index", :controller=>"users"} 
         POST /users(.:format)      {:action=>"create", :controller=>"users"} 
       new_user GET /users/new(.:format)     {:action=>"new", :controller=>"users"} 
      edit_user GET /users/:id/edit(.:format)    {:action=>"edit", :controller=>"users"} 
        user GET /users/:id(.:format)     {:action=>"show", :controller=>"users"} 
         PUT /users/:id(.:format)     {:action=>"update", :controller=>"users"} 
         DELETE /users/:id(.:format)     {:action=>"destroy", :controller=>"users"} 
       posts GET /posts(.:format)      {:action=>"index", :controller=>"posts"} 
         POST /posts(.:format)      {:action=>"create", :controller=>"posts"} 
       new_post GET /posts/new(.:format)     {:action=>"new", :controller=>"posts"} 
      edit_post GET /posts/:id/edit(.:format)    {:action=>"edit", :controller=>"posts"} 
        post GET /posts/:id(.:format)     {:action=>"show", :controller=>"posts"} 
         PUT /posts/:id(.:format)     {:action=>"update", :controller=>"posts"} 
         DELETE /posts/:id(.:format)     {:action=>"destroy", :controller=>"posts"} 

這怎麼能是可能不會出現在我的路線?

回答

0

我剛剛在打字結束時發現了我的答案,但無論如何我都發布了它,因爲它可能會幫助一些人。

在我user.rb模式,我不得不

devise :omniauthable 

但設計所需要的模塊:database_authenticatable纔能有這些路由。謎團已揭開!