I couldn't find any kind of dev mailing list for this great gem, so I'm asking this question, here.
I need to store the current user in the audit table. I've looked through the pg_audit_log code and it looks like it expects to find the user identifier in the current thread:
current_user = Thread.current[:current_user]
It seems, then, that the best way to log the user in the audit table is to set the user in the Thread.current hash for each request, like in an around controller filter. Is that correct? Or, am I missing something?
I couldn't find any kind of dev mailing list for this great gem, so I'm asking this question, here.
I need to store the current user in the audit table. I've looked through the pg_audit_log code and it looks like it expects to find the user identifier in the current thread:
current_user = Thread.current[:current_user]
It seems, then, that the best way to log the user in the audit table is to set the user in the Thread.current hash for each request, like in an around controller filter. Is that correct? Or, am I missing something?