Retreiving Session Variables

Hi Brendan,

Brendan Lim wrote:

I always get the error:

You have a nil object when you didn't expect it! You might have expected an instance of Array. The error occured while evaluating nil.

Here's my code in note.rb

temp_email = @session[:user_email]

It's possible that your problem results from using the deprecated '@session' That is now treated as an instance variable which will only have a value in the request-response cycle in which you assign it a value. Try changing @session[:user_email] to session[:user_email] in both the assignment and access statements.

hth, Bill