This is the error I get:

Called id for nil, which would mistakenly be 4 -- if you really wanted 
the id of nil, use object_id

app/controllers/enroll_controller.rb:125:in `check_authentication'
-e:4:in `load'
-e:4

I know what it means but the thing is is that it shouldn't be erroring 
out. It is erroring out because it doesn't like this:

if @user.id != session[:user].id

It thinks that session[:user] is nil and it is, but the thing is is that 
it shouldn't be. The check_authentication checks to see if a user that 
is logged in is who they say they are. When they login the first thing 
that happens is that a session gets started - session[:user] - then they 
get redirected to the appropriate pages and the check_authentication 
method gets called. I can see the session variable getting set but then 
as we move further along in the process it disapears? And when I look in 
my session folder under tmp it is empty which leads me to beleive that, 
for whatever reason, the sessions are getting created just like they 
should and then immediatly destroyed.

This is wasn't a problem a week ago, but last week I upgraded to rails 
2.1.0. from 1.2.? and then this started happening. So I am kinda at a 
loss as to what is happening and how to fix it. Thanks,

-S
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to