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:
parent
4174d321b3
commit
1a0134c942
1 changed files with 1 additions and 1 deletions
|
@ -128,7 +128,7 @@ module RailsGuides
|
|||
view.content_tag(:li, l.html_safe)
|
||||
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)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue