Skip to content

Commit

Permalink
hide breadcrumb elements when there aren't any breadcrumps to show
Browse files Browse the repository at this point in the history
  • Loading branch information
Oliver Azevedo Barnes committed Apr 16, 2012
1 parent 4b10325 commit 959e187
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions app/views/twitter-bootstrap/_breadcrumbs.html.erb
@@ -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 %>

0 comments on commit 959e187

Please sign in to comment.