Skip to content

Commit

Permalink
Fixed chapter list generation on index section, an empty pair of <ul>…
Browse files Browse the repository at this point in the history
…</ul> was being created when the chapters had no children.
  • Loading branch information
jaimeiniesta committed Mar 31, 2010
1 parent 4174d32 commit 1a0134c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion railties/guides/rails_guides/generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def set_index(body, view)
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
Expand Down

0 comments on commit 1a0134c

Please sign in to comment.