diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-22 08:58:43 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-22 08:58:43 +0000 |
commit | da0c4c5c9695e2ebe8d98b391d901b598dd293a2 (patch) | |
tree | 09894a8d950e73e0a51698e6657c131592ee9ee6 /actionpack/lib/action_controller/benchmarking.rb | |
parent | 0367317dd62ecd177d57d469a4d57974b75e425b (diff) | |
download | rails-da0c4c5c9695e2ebe8d98b391d901b598dd293a2.tar.gz rails-da0c4c5c9695e2ebe8d98b391d901b598dd293a2.tar.bz2 rails-da0c4c5c9695e2ebe8d98b391d901b598dd293a2.zip |
Deprecated all render_* methods in favor of consolidating all rendering behavior in Base#render(options). This enables more natural use of combining options, such as layouts
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1350 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/benchmarking.rb')
-rw-r--r-- | actionpack/lib/action_controller/benchmarking.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/benchmarking.rb b/actionpack/lib/action_controller/benchmarking.rb index 25d9f50e74..6a78ad5dac 100644 --- a/actionpack/lib/action_controller/benchmarking.rb +++ b/actionpack/lib/action_controller/benchmarking.rb @@ -15,12 +15,12 @@ module ActionController #:nodoc: } end - def render_with_benchmark(template_name = default_template_name, status = "200 OK") + def render_with_benchmark(options = {}, deprecated_status = nil) if logger.nil? - render_without_benchmark(template_name, status) + render_without_benchmark(options, deprecated_status) else db_runtime = ActiveRecord::Base.connection.reset_runtime if Object.const_defined?("ActiveRecord") && ActiveRecord::Base.connected? - @rendering_runtime = Benchmark::measure{ render_without_benchmark(template_name, status) }.real + @rendering_runtime = Benchmark::measure{ render_without_benchmark(options, deprecated_status) }.real if Object.const_defined?("ActiveRecord") && ActiveRecord::Base.connected? @db_rt_before_render = db_runtime |