Is @request and the other controller attributes not
available in a controller’s initialize function? What
I’m trying to do:
def initialize
super
server_name = @request.env["SERVER_NAME"]
@site=Site.find :first,
:conditions => ["server_name=?", server_name]
end
It gives this error:
You have a nil object when you didn’t expect it!
The error occured while evaluating nil.env
thanks
csn
Yahoo! Mail - PC Magazine Editors’ Choice 2005