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

Pass the correct formats

This commit is contained in:
Rafael Mendonça França 2015-08-24 15:36:14 -03:00
parent face604266
commit 518ae9f055

View file

@ -382,8 +382,8 @@ module ActionView
case name
when String then _normalize_layout(name)
when Proc then name
when true then Proc.new { _default_layout(formats, true) }
when :default then Proc.new { _default_layout(formats, false) }
when true then Proc.new { |formats| _default_layout(formats, true) }
when :default then Proc.new { |formats| _default_layout(formats, false) }
when false, nil then nil
else
raise ArgumentError,