diff options
Diffstat (limited to 'actionpack/lib/abstract_controller')
-rw-r--r-- | actionpack/lib/abstract_controller/layouts.rb | 1 | ||||
-rw-r--r-- | actionpack/lib/abstract_controller/rendering.rb | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/abstract_controller/layouts.rb b/actionpack/lib/abstract_controller/layouts.rb index 958e7f7ec8..bbc9739f14 100644 --- a/actionpack/lib/abstract_controller/layouts.rb +++ b/actionpack/lib/abstract_controller/layouts.rb @@ -345,6 +345,7 @@ 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, diff --git a/actionpack/lib/abstract_controller/rendering.rb b/actionpack/lib/abstract_controller/rendering.rb index 5d9b35d297..cc6a7f4047 100644 --- a/actionpack/lib/abstract_controller/rendering.rb +++ b/actionpack/lib/abstract_controller/rendering.rb @@ -66,7 +66,7 @@ module AbstractController attr_writer :view_context_class def view_context_class - @view_context_class || self.class.view_context_class + (@view_context_class ||= nil) || self.class.view_context_class end def initialize(*) |