audited icon indicating copy to clipboard operation
audited copied to clipboard

Setting current_user per model instead of globally

Open noctivityinc opened this issue 4 years ago • 0 comments

We have some models where the user is not logged in that we want to record activity, such as a visitor buying a gift. Instead of having to wrap EVERY safe with:

Audited.audit_class.as_user(@gift.sender_name) do

Is there a way to we can just set current_user to some string value on a per-model basis?

noctivityinc avatar Oct 25 '21 02:10 noctivityinc