Any suggestions on how best to gain access to session-type information
while in an ActiveRecord callback, such as after_save?
I am encrypting some information in the database, using the
generalized encryption/decryption handler in “Agile Web D.
With Rails” (p 375ff). I got it working, and now I want to reference
a session field (a user PIN) which is NOT stored in the database…
for security reasons.
I can’t seem to gain access to the session method:
- attempting to use session[‘user’][‘pin’] gives me an “undefined
variable or method”
- attempting to use UserController.session[‘user’][‘pin’] gives me a
message saying that it’s expecting an integer, not a string.
Any ideas as to how to either (1) gain access to the session hash or
(2) provide my own application-wide storage mechanism?