Access session data from observer

I am writing an internal time tracking app, and am curious to know if
it’s possible to access the session data from an observer. Each ‘user’
has a list of their current projects, which is updated (via an observer)
everytime a ‘project’ or ‘hour’ is saved. To find out who the current
user is, I am trying to do a User.find(session[:user_id]) but receiving
a ‘session is undefined’ error message.

To this end, I am wondering if
a) it’s possible to access session data from the observer; or
b) there’s a better way to do this?

Thanks

Phil

a) it’s possible to access session data from the observer; or

have a look at: ActionController::Integration::Session - the RDOC talks
abt how to ‘mimic multiple simultaneous users interacting with your
system’

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs