aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/caching/actions.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/caching/actions.rb')
-rw-r--r--actionpack/lib/action_controller/caching/actions.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/caching/actions.rb b/actionpack/lib/action_controller/caching/actions.rb
index d8a1662acc..cb0c3a1384 100644
--- a/actionpack/lib/action_controller/caching/actions.rb
+++ b/actionpack/lib/action_controller/caching/actions.rb
@@ -129,8 +129,7 @@ module ActionController #:nodoc:
end
def content_for_layout(controller)
- # TODO: Remove this when new base is merged in
- template = controller.respond_to?(:template) ? controller.template : controller._action_view
+ template = controller.view_context
template.layout && template.instance_variable_get('@cached_content_for_layout')
end
end