aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2007-11-14 09:39:27 +0000
committerMichael Koziarski <michael@koziarski.com>2007-11-14 09:39:27 +0000
commit696d140b6ce291262861ce7fc146de79461a8ecc (patch)
tree24e337f36a02d812ea7b58e917cc5b77d9ccb7d5
parent5ce6d7453146ddb5bb273371fa84c52f442ac705 (diff)
downloadrails-696d140b6ce291262861ce7fc146de79461a8ecc.tar.gz
rails-696d140b6ce291262861ce7fc146de79461a8ecc.tar.bz2
rails-696d140b6ce291262861ce7fc146de79461a8ecc.zip
Only Benchmark and log if we're going to output the information.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8136 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r--actionpack/lib/action_view/partials.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/partials.rb b/actionpack/lib/action_view/partials.rb
index b0570ef78c..0795b8ec55 100644
--- a/actionpack/lib/action_view/partials.rb
+++ b/actionpack/lib/action_view/partials.rb
@@ -112,7 +112,7 @@ module ActionView
add_counter_to_local_assigns!(partial_name, local_assigns)
add_object_to_local_assigns!(partial_name, local_assigns, object)
- if logger
+ if logger && logger.debug?
ActionController::Base.benchmark("Rendered #{path}/_#{partial_name}", Logger::DEBUG, false) do
render("#{path}/_#{partial_name}", local_assigns)
end