Hi Carlos,

On Sat, 2009-03-14 at 21:30 +0100, Carlos Santana wrote:

> My objective is to avoid nil object errors when no user is logged in - 
> i.e. when session[:user] is nil.
> 
> However, I still need to call some instance methods on this object.
> 
> Please suggest me how can I do this?

I'm thinkin' I must be missin' somethin'.  Why can't you use...

do_somethin' unless session[:user].nil?

?

Best regards,
Bill


--~--~---------~--~----~------------~-------~--~----~
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