Skip to content

Commit

Permalink
Fix _write_layout_method
Browse files Browse the repository at this point in the history
  • Loading branch information
kamipo committed Aug 1, 2019
1 parent d40c88a commit ad95727
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion actionview/lib/action_view/layouts.rb
Original file line number Diff line number Diff line change
Expand Up @@ -306,12 +306,12 @@ def _write_layout_method # :nodoc:
RUBY
when Proc
define_method :_layout_from_proc, &_layout
private :_layout_from_proc
<<-RUBY
result = _layout_from_proc(#{_layout.arity == 0 ? '' : 'self'})
return #{default_behavior} if result.nil?
result
RUBY
private :_layout_from_proc
when false
nil
when true
Expand Down

0 comments on commit ad95727

Please sign in to comment.