1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Fix _write_layout_method

This commit is contained in:
Ryuta Kamizono 2019-08-02 01:55:47 +09:00
parent d40c88ae05
commit ad957273f5

View file

@ -306,12 +306,12 @@ module ActionView
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