aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/abstract_controller/layouts.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/abstract_controller/layouts.rb')
-rw-r--r--actionpack/lib/abstract_controller/layouts.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb
index bbc9739f14..5c853c3034 100644
--- a/actionpack/lib/abstract_controller/layouts.rb
+++ b/actionpack/lib/abstract_controller/layouts.rb
@@ -345,11 +345,9 @@ module AbstractController
# * <tt>template</tt> - The template object for the default layout (or nil)
def _default_layout(require_layout = false)
begin
- @_layout ||= nil
layout_name = _layout if action_has_layout?
rescue NameError => e
- raise NoMethodError,
- "You specified #{@_layout.inspect} as the layout, but no such method was found"
+ raise e.class, "Coult not render layout: #{e.message}"
end
if require_layout && action_has_layout? && !layout_name