Closed noctivityinc closed 3 weeks ago
For anyone wanting to do this still, I got this to work:
tracked owner: proc { |controller, model| controller&.send :current_account }, params: { changes: proc { |c, m| m.saved_changes.except(:updated_at).to_h } }
I understand that this is not the paper_clip gem, but it would be nice to always save the
saved_changes
hash as a parameter every time I update a record that is tracked.Unfortunately, I can't seem to find a way to do this. I tried adding:
and even tried overriding the PublicActivity::Update method but nothing seems to work. How can I easily store the changes hash as a parameter for all tracked updates?