Re: Auditing: session[:user] reference in after_save callback

Chris Dekker
2008-04-23T22:01:46Z

sw0rdfish wrote:
> I''m probably mis-understanding the question, but is the problem
you
> want information about the user logged in?  Could you not do a Find on
> the user table using the ID of the user saved in the [:session] ?
>
> On Apr 23, 5:01�pm, Chris Dekker
<rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org>

Thats the plan yeah. But the thing is I want need the logged in user
(from the session in my MODEL, since this is the only place I can call
my before_ and after_save functions.

So the hard part is getting the ID from the session to the Model, since
this is not really Ruby''s way of doing it.