aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/renderable_partial.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view/renderable_partial.rb')
-rw-r--r--actionpack/lib/action_view/renderable_partial.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/renderable_partial.rb b/actionpack/lib/action_view/renderable_partial.rb
index 342850f0f0..5203e57ead 100644
--- a/actionpack/lib/action_view/renderable_partial.rb
+++ b/actionpack/lib/action_view/renderable_partial.rb
@@ -16,7 +16,11 @@ module ActionView
memoize :counter_name
def render(view, local_assigns = {})
- ActionController::Base.benchmark("Rendered #{path_without_format_and_extension}", Logger::DEBUG, false) do
+ if defined? ActionController
+ ActionController::Base.benchmark("Rendered #{path_without_format_and_extension}", Logger::DEBUG, false) do
+ super
+ end
+ else
super
end
end