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

Fixed chapter list generation on index section, an empty pair of <ul></ul> was being created when the chapters had no children.

This commit is contained in:
Jaime Iniesta 2010-04-01 01:14:18 +02:00
parent 4174d321b3
commit 1a0134c942

View file

@ -128,7 +128,7 @@ module RailsGuides
view.content_tag(:li, l.html_safe) view.content_tag(:li, l.html_safe)
end end
children_ul = view.content_tag(:ul, children.join(" ").html_safe) children_ul = children.empty? ? "" : view.content_tag(:ul, children.join(" ").html_safe)
index << view.content_tag(:li, link.html_safe + children_ul.html_safe) index << view.content_tag(:li, link.html_safe + children_ul.html_safe)
end end