diff options
author | Pratik Naik <pratiknaik@gmail.com> | 2008-12-11 12:40:22 +0000 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-12-11 12:40:22 +0000 |
commit | 9b98362cda013f85406ae8b26922264d382794dd (patch) | |
tree | 9842eeee02a1e2b571e0008b18c5a8b390256224 /actionpack/lib/action_view | |
parent | ea12819adf5d5fa1e8ae07789478e18db887cda1 (diff) | |
parent | 69387ce0169b95d3a170cfb1c66a7570b1746e37 (diff) | |
download | rails-9b98362cda013f85406ae8b26922264d382794dd.tar.gz rails-9b98362cda013f85406ae8b26922264d382794dd.tar.bz2 rails-9b98362cda013f85406ae8b26922264d382794dd.zip |
Merge commit 'mainstream/master'
Conflicts:
railties/doc/guides/html/activerecord_validations_callbacks.html
railties/doc/guides/source/activerecord_validations_callbacks.txt
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r-- | actionpack/lib/action_view/helpers/benchmark_helper.rb | 6 | ||||
-rw-r--r-- | actionpack/lib/action_view/helpers/tag_helper.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_view/helpers/benchmark_helper.rb b/actionpack/lib/action_view/helpers/benchmark_helper.rb index bd72cda700..372d24a22e 100644 --- a/actionpack/lib/action_view/helpers/benchmark_helper.rb +++ b/actionpack/lib/action_view/helpers/benchmark_helper.rb @@ -22,12 +22,12 @@ module ActionView # (:debug, :info, :warn, :error); the default value is :info. def benchmark(message = "Benchmarking", level = :info) if controller.logger - seconds = Benchmark.realtime { yield } - controller.logger.send(level, "#{message} (#{'%.1f' % (seconds * 1000)}ms)") + ms = Benchmark.ms { yield } + controller.logger.send(level, '%s (%.1fms)' % [message, ms]) else yield end end end end -end
\ No newline at end of file +end diff --git a/actionpack/lib/action_view/helpers/tag_helper.rb b/actionpack/lib/action_view/helpers/tag_helper.rb index 3b301248ff..af8c4d5e21 100644 --- a/actionpack/lib/action_view/helpers/tag_helper.rb +++ b/actionpack/lib/action_view/helpers/tag_helper.rb @@ -1,4 +1,4 @@ -require 'erb' +require 'action_view/erb/util' require 'set' module ActionView |