Cookies in custom class

Hello!

I have created a custom class in my RoR application and put it into lib/ folder.
How can I access cookies and session variables in this class? I need to set and read variables from them.

Best regards.

Hello!

I have created a custom class in my RoR application and put it into
lib/
folder.
How can I access cookies and session variables in this class? I need
to
set and read variables from them.

You can't sensibly. cookies and session are instance methods of
controllers.

Fred

Maybe I can inherit my class from controller?
I really need to make a stand alone class to operate with session and
cookie variables

Maybe I can inherit my class from controller?

wouldn't make any difference - you wouldn't be that instance of the
controller.

I really need to make a stand alone class to operate with session and
cookie variables

Just pass session/cookie parameters through when you call stuff in
your magic.

if you have to, have a look at http://m.onkey.org/2007/10/17/how-to-access-session-cookies-params-request-in-model

Fred