[Rails] Accessing cookie and session objects

Lindsay Boyd
Fri, 03 Mar 2006 14:14:43 -0000

Is it possible to directly access session and cookie objects from within
a Model? When I try to read the session object in my User Model I get
the following error:

NameError (undefined local variable or method `session'' for
User:Class):

I could pass attributes taken from the session into my method in the
User Model, but this seems to go against DRY.

-Lindsay

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