Method: Currentsh::RailsTracker#register

Defined in:
lib/currentsh/rails.rb

#registerObject



7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
# File 'lib/currentsh/rails.rb', line 7

def register
  ActiveSupport::Notifications.subscribe "sql.active_record" do |*args|
    event = ActiveSupport::Notifications::Event.new *args
    sql(event)
  end

  ActiveSupport::Notifications.subscribe "process_action.action_controller" do |*args|
    event = ActiveSupport::Notifications::Event.new *args
    action(event)
  end

  ActiveSupport::Notifications.subscribe "request.action_dispatch" do |*args|
    event = ActiveSupport::Notifications::Event.new *args
    request(event)
  end
end