Sha256: 01d1c946a16f9c9d50df03a76bd95bb207022b710495578383e31cb45fe628a6
Contents?: true
Size: 569 Bytes
Versions: 491
Compression:
Stored size: 569 Bytes
Contents
<% def category_list(cat) str = "<ul>" str << category_list_items(cat) str << "</ul>" return str end def category_list_items(cat) str = "<li><a href='/admin/categories/#{cat.id}'>#{cat.name}</a>" cat.children.each{ |kid| str << category_list(kid) } if cat.children && cat.children.count > 0 str << "</li>" return str end %> <h1>Categories</h1> <a href='/admin/categories/new'>New Category</a> <%= category_list(@top_cat) %> <% content_for :caboose_js do %> <script type='text/javascript'> </script> <% end %>
Version data entries
491 entries across 491 versions & 1 rubygems