Skip to content
This repository
Browse code

Shush uninitialized @_layout warning

  • Loading branch information...
commit c203557421b45e4c78de9d551e96e042b1553833 1 parent ddba97f
Jeremy Kemper authored September 28, 2012
2  actionpack/lib/abstract_controller/layouts.rb
@@ -309,7 +309,7 @@ def _write_layout_method
309 309
           # still does a dynamic lookup. In next Rails release, we should @_layout
310 310
           # to be inheritable so we can skip the child lookup if the parent explicitly
311 311
           # set the layout.
312  
-          parent   = self.superclass.instance_variable_get(:@_layout)
  312
+          parent   = self.superclass.instance_eval { @_layout if defined?(@_layout) }
313 313
           @_layout = nil
314 314
           inspect  = parent.is_a?(Proc) ? parent.inspect : parent
315 315
 

0 notes on commit c203557

Please sign in to comment.
Something went wrong with that request. Please try again.