lib/browser-prof.rb in browser-prof-1.2.4 vs lib/browser-prof.rb in browser-prof-1.2.5

- old
+ new

@@ -1,9 +1,13 @@ module ActionController class Base def process_with_browser_profiling(request, response, method = :perform_action, *arguments) - browser_output = request.parameters.key?('browser_profile!') || request.parameters[:params].key?('browser_profile!') || ENV["BROWSER_PROFILE"] - file_output = request.parameters.key?('file_profile') || request.parameters[:params].key?('file_profile!') || ENV["FILE_PROFILE"] + browser_output = request.parameters.key?('browser_profile!') || + (request.parameters[:params] && request.parameters[:params].key?('browser_profile!')) || + ENV["BROWSER_PROFILE"] + file_output = request.parameters.key?('file_profile!') || + (request.parameters[:params] && request.parameters[:params].key?('file_profile!')) || + ENV["FILE_PROFILE"] if (browser_output or file_output) # Only require these files in needed require 'ruby-prof' require 'ruby-prof/graph_html_printer_enhanced'