Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 779 Bytes
1 | acts_as_tree |
2 | ============ |
3 | |
4 | Specify this +acts_as+ extension if you want to model a tree structure by providing a parent association and a children |
5 | association. This requires that you have a foreign key column, which by default is called +parent_id+. |
6 | |
7 | class Category < ActiveRecord::Base |
8 | acts_as_tree :order => "name" |
9 | end |
10 | |
11 | Example: |
12 | root |
13 | \_ child1 |
14 | \_ subchild1 |
15 | \_ subchild2 |
16 | |
17 | root = Category.create("name" => "root") |
18 | child1 = root.children.create("name" => "child1") |
19 | subchild1 = child1.children.create("name" => "subchild1") |
20 | |
21 | root.parent # => nil |
22 | child1.parent # => root |
23 | root.children # => [child1] |
24 | root.children.first.children.first # => subchild1 |
25 | |
26 | Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license |