Last active
January 3, 2016 08:49
-
-
Save mikecmpbll/8438692 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<body id="brands" data-hook="body"> | |
<ul class="letters"> | |
<% ('A'..'Z').each do |letter| %> | |
<li><%= link_to letter, "#", class: "key-link", data: { letter: letter } %></li> | |
<% end %> | |
</ul> | |
<hr> | |
<% @brands.each do |key, brands| %> | |
<ul class="brand-letters"> | |
<li id="letter-<%= key %>" class="key"><%= key %></li> | |
<% brands.each do |taxon| %> | |
<li class="name"><%= link_to taxon.name, seo_url(taxon) %></li> | |
<% end %> | |
</ul> | |
<% end %> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ... | |
@brands = Spree::Taxonomy.where(:name => 'Brands').first.taxons.order(:name).group_by { |b| b.name[0] } %> | |
# ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment