In my app, there is an observer that gets fired when an change is done
on one table. what i want it to do is to write into an other table the
action done and the user which made the action.
But until now i didn't manage to get the session data into the
observer. I always get "session, undefined methode for observer"
Observers, like models, are not meant to have access to the session. It’s a violation of the MVC pattern.
You’re not really supposed to be doing what you’re doing. It does make doing auditing a bit harder. However, the Rails Recipes book shows how you can hack cache_sweepers to do what you’re trying to do.