map.sign_in "/login", :controller => "sessions", :action => "new"
or
match "/login" => "sessions#new", :as => :sign_in
I actually get -
Routing Error
uninitialized constant SessionsController
Is something wrong with rails and Engines or I am doing something
wrong? Thanks.
P.S.
I already had one question about devise and here is the result
http://wiki.github.com/plataformatec/devise/custom-field-for-sign-in
Will be glad to help in advise
You really need to set config.default_scope to your unique scope as
well (for instance :user), to let Devise/Warden know about it.
And you also don't need to setup the routes by yourself, by using
default_scope, Devise/Warden will use this scope when you request /
sign_in for instance. But if you really want/need to do it,
controllers are under Devise module, so you don't have
SessionsController, but Devise::SessionsController.
--
Carlos Antonio
On Apr 1, 5:46 pm, Andrew Romanov <judo....@gmail.com> wrote:
> Hello. I want to have /login route instead of /users/sign_in. I am
> using Ubuntu 9.10, rails3 edge, devise edge. I found out that to make
> that work I have to set config.use_default_scope in "config/
> initializers/devise.rb" to true . I could set config.default_scope
> = :user, but I have actually only one model that uses devise gem. When
> I set routes to
>
> map.sign_in "/login", :controller => "sessions", :action => "new"
> or
> match "/login" => "sessions#new", :as => :sign_in
>
> I actually get -
> Routing Error
> uninitialized constant SessionsController
>
> Is something wrong with rails and Engines or I am doing something
> wrong? Thanks.
>
> P.S.
> I already had one question about devise and here is the resulthttp://wiki.github.com/plataformatec/devise/custom-field-for-sign-in
--
To unsubscribe, reply using "remove me" as the subject.