diff options
author | David Heinemeier Hansson <david@envy8.local> | 2008-04-27 22:46:19 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@envy8.local> | 2008-04-27 22:46:19 -0500 |
commit | 850aba5473ce14edcd067f16badfa198e2070095 (patch) | |
tree | 2c87118a5ccd0f79ac6c4e10a9e7c374515e21d5 /actionpack/lib/action_view | |
parent | dc2d6930145ac80affb12bebf0fede21792755cf (diff) | |
download | rails-850aba5473ce14edcd067f16badfa198e2070095.tar.gz rails-850aba5473ce14edcd067f16badfa198e2070095.tar.bz2 rails-850aba5473ce14edcd067f16badfa198e2070095.zip |
Fixed that BenchmarkHelper should use controller.logger instead of @logger (which now apparently is gone)
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/benchmark_helper.rb | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/benchmark_helper.rb b/actionpack/lib/action_view/helpers/benchmark_helper.rb index fefa28f4d7..c278a38f25 100644 --- a/actionpack/lib/action_view/helpers/benchmark_helper.rb +++ b/actionpack/lib/action_view/helpers/benchmark_helper.rb @@ -21,11 +21,13 @@ module ActionView # You may give an optional logger level as the second argument # (:debug, :info, :warn, :error); the default value is :info. def benchmark(message = "Benchmarking", level = :info) - if @logger + if controller.logger real = Benchmark.realtime { yield } - @logger.send level, "#{message} (#{'%.5f' % real})" + controller.logger.send level, "#{message} (#{'%.5f' % real})" + else + yield end end end end -end +end
\ No newline at end of file |