I am using the Audited gem for Rails, and am using the associated audits like so:
audited allow_mass_assignment: true, associated_with: :protocol
The problem is, I need this particular model's audits to be associated with more than one models. I was hoping that something like this will work:
audited allow_mass_assignment: true, associated_with: [:protocol, :patient]
But it doesn't. It provides a clear error stating:
[:protocol, :patient] is not a symbol nor a string
The only related page I could find claims it is simply not possible, but it is quite old and I hope there is some workaround.
Any help is appreciated as always.
For anyone searching if you can use
associated_with
with multiple associations, currently that is not possible.Although, someone submitted a PR, it did not work as expected.