Permalink
Browse files

Eliminate warning with layout is unset

  • Loading branch information...
1 parent f14eb68 commit 1fcf32f8fef8fb5a63a66edacf556a107d12c049 @jeremy jeremy committed Nov 10, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 actionpack/lib/abstract_controller/layouts.rb
View
2 actionpack/lib/abstract_controller/layouts.rb
@@ -100,7 +100,7 @@ def _implied_layout_name
# name, return that string. Otherwise, use the superclass'
# layout (which might also be implied)
def _write_layout_method
- case @_layout
+ case defined?(@_layout) ? @_layout : nil
when String
self.class_eval %{def _layout(details) #{@_layout.inspect} end}
when Symbol

0 comments on commit 1fcf32f

Please sign in to comment.