diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_controller/abstract/layouts.rb | 2 | ||||
-rw-r--r-- | actionpack/lib/action_controller/base/compatibility.rb | 7 |
2 files changed, 7 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/abstract/layouts.rb b/actionpack/lib/action_controller/abstract/layouts.rb index 6aa196e807..2ac4e6068a 100644 --- a/actionpack/lib/action_controller/abstract/layouts.rb +++ b/actionpack/lib/action_controller/abstract/layouts.rb @@ -140,8 +140,6 @@ module AbstractController rescue NameError => e raise NoMethodError, "You specified #{@_layout.inspect} as the layout, but no such method was found" - rescue ActionView::MissingTemplate - _find_by_parts(_layout({}), {}) end end 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 |