Class: ActionController::Dispatcher

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

Instance Method Summary collapse

Instance Method Details

#call_with_benchmark_for_rails_reporting(*args, &block) ⇒ Object

print reports at the end



36
37
38
39
40
41
# File 'lib/reporting.rb', line 36

def call_with_benchmark_for_rails_reporting(*args, &block) #:nodoc:
  call_without_benchmark_for_rails_reporting(*args, &block).tap do |status, headers, response|
    BenchmarkForRails.report(ActionController::Request.new(args.first))
    Rails.logger.flush if Rails.logger.respond_to? :flush
  end
end