I think this is a very interesting question. I'll think out loud here a minute ...
Ultimately, what we are faced with is the decision to violate the acceptable design pattern practice in order to achieve a certain set of functionality. So we have to ask ourselves
1) What are the possible solutions that would not violate the MVC pattern
2) What are the possible solutions that would violate the MVC pattern
3) Which option is better? I believe that design patterns and standard methods are very important, but at the same time, if holding them makes your code more complex, the rule may be a violation of the rules. Some people may disagree with me about this.
Let's take a look at # 1 first.
From above my head, I would think of the following possible solutions
A) If you are really interested in who performs these actions, should this data be stored in the model in any way? This will make this information available to your supervisor. And that also means that any other user interface of your ActiveRecord class gets the same features.
B) If you are not very interested in understanding who created the record, but are more interested in registering the web actions themselves, then you can think about "observing" the actions of the controller. It has been a while since I climbed the Rails source, so Iβm not sure that their ActiveRecord :: Observer "watches" the model, but you can adapt it to the controller observer. In this sense, you no longer observe the model, and it makes sense to make this information about the session and other information such as a controller to this observer. C) The simplest solution with the smallest "structure" is to simply drop your registration code at the end of your action methods that you are looking at.
Consider option number 2, violating the methods of MVC.
A) As you suggest, you could find means so that your Observer model has access to session data. You have tied your model to your business logic.
B) It is impossible to invent others :)
My personal inclination, not knowing more details about your project, is either 1A if I want to attach people to posts, or 1C if there are only a few places where I am interested in this. If you really want a reliable logging solution for all your controllers and actions, you can consider 1B.
If your model observer discovers that the session data is a little βsmellyβ and is likely to break if you try to use your model in any other project / situation / context.