I've installed Authlogic on Rails 3 following the Railscast (http://
railscasts.com/episodes/160-authlogic), and the resources I was able
to find on the web, but I'm facing a problem.
Once I've generated the user_sessions controller and mapped the login
and logout routes, I get an error if I try to load the login page :
uninitialized constant UserSessionsController::UserSession
app/controllers/user_sessions_controller.rb:11:in `new'
The user_sessions model is really simple :
class UserSession < Authlogic::Session::Base
end
But it looks like this class declaration is not considered by Rails...
Have a look at this link DIXIS authlogic on rails3 on how to setup
authlogic with rails 3. I have had a similar problem, and after
following that tutorial, I managed to resolve my problem.
I do get a few deprecation warnings, but overall it has been working ok.
I've installed Authlogic on Rails 3 following the Railscast (http://
railscasts.com/episodes/160-authlogic), and the resources I was able
to find on the web, but I'm facing a problem.
Once I've generated the user_sessions controller and mapped the login
and logout routes, I get an error if I try to load the login page :
uninitialized constant UserSessionsController::UserSession
app/controllers/user_sessions_controller.rb:11:in `new'
The user_sessions model is really simple :
class UserSession < Authlogic::Session::Base
end
But it looks like this class declaration is not considered by Rails...
Where is that file? is it in user_session.rb somewhere on the loadpath
(not user_sessions.rb)
Yes it is, but in my setup it is user_sessions.rb with an "s". It
seems to me (but I'm a RoR newbie) that controller files should have
an "s"...
Can you tell me more on that ?
Thx
Romain