diff options
author | Jaime Iniesta <jaimeiniesta@gmail.com> | 2010-04-01 01:14:18 +0200 |
---|---|---|
committer | Jaime Iniesta <jaimeiniesta@gmail.com> | 2010-04-01 01:14:18 +0200 |
commit | 1a0134c9426ee9bfa6a8094edd47914e6c0f1531 (patch) | |
tree | 90d0de1ef5f58cc7a15960f0f59f91a9a652bf54 /railties/guides/rails_guides | |
parent | 4174d321b3a522d8c32cb8de123b520fcef052c0 (diff) | |
download | rails-1a0134c9426ee9bfa6a8094edd47914e6c0f1531.tar.gz rails-1a0134c9426ee9bfa6a8094edd47914e6c0f1531.tar.bz2 rails-1a0134c9426ee9bfa6a8094edd47914e6c0f1531.zip |
Fixed chapter list generation on index section, an empty pair of <ul></ul> was being created when the chapters had no children.
Diffstat (limited to 'railties/guides/rails_guides')
-rw-r--r-- | railties/guides/rails_guides/generator.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/railties/guides/rails_guides/generator.rb b/railties/guides/rails_guides/generator.rb index 17a4f2ff8a..aa24ed2722 100644 --- a/railties/guides/rails_guides/generator.rb +++ b/railties/guides/rails_guides/generator.rb @@ -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 |