Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Hide breadcrumb elements when there aren't any breadcrumbs to show #191

Merged
merged 1 commit into from Apr 16, 2012
Jump to file or symbol
Failed to load files and symbols.
+10 −10
Split
@@ -1,14 +1,14 @@
+<% if @breadcrumbs %>
<ul class="breadcrumb">
<% separator = divider %>
- <% if @breadcrumbs %>
- <% @breadcrumbs[0..-2].each do |crumb| %>
- <li>
- <a href="<%= crumb[:url] %>"><%= crumb[:name] %></a>
- <span class="divider"><%= separator %></span>
- </li>
- <% end %>
- <li class="active">
- <a href="<%= @breadcrumbs.last[:url] %>"><%= @breadcrumbs.last[:name] %></a>
- </li>
+ <% @breadcrumbs[0..-2].each do |crumb| %>
+ <li>
+ <a href="<%= crumb[:url] %>"><%= crumb[:name] %></a>
+ <span class="divider"><%= separator %></span>
+ </li>
<% end %>
+ <li class="active">
+ <a href="<%= @breadcrumbs.last[:url] %>"><%= @breadcrumbs.last[:name] %></a>
+ </li>
</ul>
+<% end %>