简体   繁体   中英

Devise not route properly rails

I have an app in rails and using devise for authentication , the following errors are shown instead route to sign_in page

my route.rb content are:

Blog::Application.routes.draw do
  devise_for :users 
  resources :posts
  get "home/index"
   root :to => 'home#index'
end

在此输入图像描述

I not sure where i was wrong, it would be great if anyone can shows me where the errors is.Thanks

使用:as配置资源名称的选项。

<%= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| %>

What is your use case for needing a SessionsController ? If it is only for signing out, you could simply create your own method that calls sign_out @user .

Have a look at this wiki article and see if it answers your question.

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM