Class: ActionController::LogSubscriber

Inherits:
Object
  • Object
show all
Defined in:
lib/time_bandits/monkey_patches/action_controller.rb

Instance Method Summary collapse

Instance Method Details

#process_action(event) ⇒ Object

the original method logs the completed line. but we do it in the middleware, unless we’re in test mode. don’t ask.



31
32
33
34
35
36
37
38
39
# File 'lib/time_bandits/monkey_patches/action_controller.rb', line 31

def process_action(event)
  payload   = event.payload
  additions = ActionController::Base.log_process_action(payload)

  Thread.current.thread_variable_set(
    :time_bandits_completed_info,
    [ event.duration, additions, payload[:view_runtime], "#{payload[:controller]}##{payload[:action]}" ]
  )
end