aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/helpers
diff options
context:
space:
mode:
authorSergey Nartimov <just.lest@gmail.com>2012-01-07 12:07:36 +0300
committerSergey Nartimov <just.lest@gmail.com>2012-01-07 12:17:48 +0300
commit904e544cc8f5846de7c31827bb5556c6a238c0de (patch)
tree54ad280c11284a2ebfe469bc72de8da286c29c22 /actionpack/lib/action_view/helpers
parent686f94e7683db3f2e302a59d89293e46bb58b977 (diff)
downloadrails-904e544cc8f5846de7c31827bb5556c6a238c0de.tar.gz
rails-904e544cc8f5846de7c31827bb5556c6a238c0de.tar.bz2
rails-904e544cc8f5846de7c31827bb5556c6a238c0de.zip
add benchmark helper that works in erb
Diffstat (limited to 'actionpack/lib/action_view/helpers')
-rw-r--r--actionpack/lib/action_view/helpers/benchmark_helper.rb13
1 files changed, 13 insertions, 0 deletions
diff --git a/actionpack/lib/action_view/helpers/benchmark_helper.rb b/actionpack/lib/action_view/helpers/benchmark_helper.rb
new file mode 100644
index 0000000000..dfdd5a786d
--- /dev/null
+++ b/actionpack/lib/action_view/helpers/benchmark_helper.rb
@@ -0,0 +1,13 @@
+require 'active_support/benchmarkable'
+
+module ActionView
+ module Helpers
+ module BenchmarkHelper
+ include ActiveSupport::Benchmarkable
+
+ def benchmark(*)
+ capture { super }
+ end
+ end
+ end
+end