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.