Hey guys,
I really appreciate the help; I’m a relative Rails newbie who has
been managing the application after our main developer moved on.
Everything has been working fine until today, Jan 1, 2008, when our
users can’t log on.
Authentication seems to work. In our account controller, we’ve got
code directing them to /home/myhome if they login successfully:
if session[:user] = User.authenticate(params[:user_login],
params[:user_password])
flash[‘notice’] = “Login successful”
redirect_back_or_default ‘/home/myhome’
They are redirected to home/myhome successfully. However the home
controller has a before_filter :login_required, :only => [:myhome]
and the user is immediately directed to the sign up page.
The log files go like:
[PASSING LOG IN PARAMETERS PART SNIPPED HERE]
Redirected to http://localhost:3000/home/myhome
Completed in 0.02047 (48 reqs/sec) | DB: 0.00981 (47%) | 302 Found
[http://localhost/account/login]
Processing HomeController#myhome (for 127.0.0.1 at 2008-01-01
16:03:26) [GET]
Session ID: 935f6485621d1924a2e9027b9cd4601b
Parameters: {“action”=>“myhome”, “controller”=>“home”}
Redirected to http://localhost:3000/account/signup
Filter chain halted as
[#<ActionController::Filters::ClassMethods::SymbolFilter:0x32f4754
@filter=:login_required>] returned false.
Completed in 0.00039 (2590 reqs/sec) | DB: 0.00000 (0%) | 302 Found
[http://localhost/home/myhome]
Any ideas why this wouldn’t be working in 2008? Thanks very much!
Jon
Jon Phillips | Stashmatic
[email protected]