public
Description: Some helpers for using trees in Rails
Homepage:
Clone URL: git://github.com/collectiveidea/recursable.git
Click here to lend your support to: recursable and make a donation at www.pledgie.com !
recursable / README
100644 16 lines (12 sloc) 0.4 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Recursable
==========
 
Recursable is a plugin that provides a method for recursing through trees and nested sets.
 
  <% @things.recurse do |thing, recurse| -%>
    <li>
      <%=h thing.name %>
      <% unless thing.children.empty? -%>
        <ul><% recurse.call %></ul>
      <% end %>
    <% end %>
  <% end -%>
 
Copyright (c) 2007 Daniel Morrison, Collective Idea, released under the MIT license