The default root page of my app needs to be the login page.
If I do this (as suggested in this question):
root :to => "devise/sessions#new
I get:
Started GET "/" for 127.0.0.1 at 2011-04-06 10:36:38 +0200
Processing by Devise::SessionsController#new as HTML
Completed in 0ms
AbstractController::ActionNotFound (AbstractController::ActionNotFound):
I've also tried to overwrite the Devise::SessionsController to look like this:
class SessionsController < Devise::SessionsController
def new
end
end
In routes I have:
devise_for :users, :controllers => {:sessions => "sessions"}
EDIT rake routes show:
...
new_user_session GET /users/sign_in(.:format) {:action=>"new", :controller=>"sessions"}
user_session POST /users/sign_in(.:format) {:action=>"create", :controller=>"sessions"}
destroy_user_session GET /users/sign_out(.:format) {:action=>"destroy", :controller=>"sessions"}
root /(.:format) {:controller=>"devise/sessions", :action=>"new"}
...
Using devise 1.1.7 with Rails 3.