Class: PeakFlowUtils::NotifierActiveRecord

Inherits:
Object
  • Object
show all
Defined in:
lib/peak_flow_utils/notifier_active_record.rb

Class Method Summary collapse

Class Method Details

.configureObject



2
3
4
5
6
7
# File 'lib/peak_flow_utils/notifier_active_record.rb', line 2

def self.configure
  ActiveSupport::Notifications.subscribe("sql.active_record") do |*args|
    event = ActiveSupport::Notifications::Event.new(*args)
    PeakFlowUtils::ActiveRecordQuery.new(event).perform
  end
end