Question

I'm currently trying to use Devise 1.1.pre3 as authentication in my upcoming project, but I can't get it to work properly.

I have done everything it says in the documentation, installed warden and the correct Devise version, run the install and used the generator to create the model. But when I try to access the sign up form (localhost:3000/users/sign_up) all I get is

No route matches "/users/sign_up"

But when I run rake routing I get the following:

...
GET  /users/sign_up(.:format) {:controller=>"devise/registrations", :action=>"new"}
...

I doesn't have any files matching that controller.

Is there any steps I have missed (installed, updated routing etc and created model)

Was it helpful?

Solution

I think the default sign_in path would be /users/sign_in.

You can override this in the route by passing it :path_names => {:sign_in => "login", :sign_out => "logout"}

Then you would login with /users/login, and logout with /users/logout.

OTHER TIPS

you should scope the relevant model in the routes.. eg..

devise_scope :user do
  get "register"  => "devise/registrations#new" 
  get "login"  => "devise/sessions#new"    
  get "logout" => "devise/sessions#destroy"
end 
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top