From 315147fcb5be2a937dcceb785de04a97616c49d0 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Tue, 16 Jun 2009 13:54:55 -0700 Subject: Move the exceptions for missing template into Compatibility in prep for moving it into a "not-production" module --- actionpack/lib/action_controller/base/compatibility.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/lib/action_controller/base') diff --git a/actionpack/lib/action_controller/base/compatibility.rb b/actionpack/lib/action_controller/base/compatibility.rb index 29ba43a879..085db284e4 100644 --- a/actionpack/lib/action_controller/base/compatibility.rb +++ b/actionpack/lib/action_controller/base/compatibility.rb @@ -118,6 +118,13 @@ module ActionController details[:prefix] = nil if name =~ /\blayouts/ super end + + # Move this into a "don't run in production" module + def _default_layout(details, require_layout = false) + super + rescue ActionView::MissingTemplate + _find_by_parts(_layout({}), {}) + end def performed? response_body -- cgit v1.2.3