Open leoplct opened 2 months ago
I want to exclude the impersonated user from tracking audits. I know that I can use this, but it's worsened performance due to JOIN.
class CustomModel < ActiveRecord::Base audited unless: Proc.new { |m| m.profile.user.admin? } end
I'd rather prefer to set it in the initializer. Would be possible?
config/initializers/audited.rb
Audited.max_audits = 1000 Audited.current_user_method = :true_user
I want to exclude the impersonated user from tracking audits. I know that I can use this, but it's worsened performance due to JOIN.
I'd rather prefer to set it in the initializer. Would be possible?
config/initializers/audited.rb