I have a bunch of models in my app for which I am listening to changes with post_save
. Additionally I have an updated_at
field on all of those which is a timestamp that will be updated on every save operation.
Assuming a model Question
with a one two many relationship with a model Answer
the following happens:
If I add an Answer
then post_save
will be triggered for both models (because of the timestamp update on Question
). In my use case I need to know weather the Question
itself was modified (in addition to updated_at
) or if post_save
was only triggered because an Answer
was added.
Is there a clean way to achieve this?