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
Make sure to have in your User model the following:
devise :registerable
If not present, devise will not generate registration routes for you.
More information in here and here
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With