I'm having trouble getting all the IDs of the children of my acts_as_tree group.
child.id seems to return the entire object.
for child in g.children child.id end
=> [#<Group id: 2, name: "Campaign Admin", parent_id: 1, affiliate_id: nil, created_at: "2008-05-04 22:21:16", updated_at: "2008-05-04 22:21:16", permission: "campaigns">, #<Group id: 4, name: "Ideas Admin", parent_id: 1, affiliate_id: nil, created_at: "2008-05-04 22:22:05", updated_at: "2008-05-04 22:22:05", permission: "ideas">, #<Group id: 3, name: "User Admin", parent_id: 1, affiliate_id: nil, created_at: "2008-05-04 22:21:39", updated_at: "2008-05-04 22:21:39", permission: "users">]
Any ideas? Thanks!