I have created a new project using devise login according to Ryan Bates' railscast . It does not have the registration routes (unlike a previous project I made, with exactly the same steps)
This image shows the two 'rake routes' commands. The top shell is my previous project that works flawlessly and the bottom is the new project.
Is there any logical reason that it didn't create the routes properly? Can I add the routes? How do I make it work ?
EDIT: Here is my routes.rb file, identical to a working devise project, standard comments removed.
Clubadmin::Application.routes.draw do
#added by devise
devise_for :users
#added by me for home page
root :to => "home#index"
#And I don't like RESTful apps.
match ':controller(/:action(/:id(.:format)))'
end
Ok, I can't see why the version Ryan Bates uses would not work twice, but I installed devise 1.4.9 and followed the installation briefly outlined here .
To make the logout link work I had to change the path type from :delete
to :get
in config/initializers/devise.rb
config.sign_out_via = :delete
to
config.sign_out_via = :get
And it has worked twice so far.
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.