Forum: Ruby on Rails Reg:act_as_tree

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
128082de86cff466b5ed32a22933a1cf?d=identicon&s=25 charan (Guest)
on 2009-06-06 10:34
(Received via mailing list)
HI



am using acts_as_tree and yui to generate tree structure,
as per the DB is consern for acts_as_tree,the parent and child nodes
are from one table..


i have two different table like


region table
-------------
pk     name
1      hyderabad
2      chennai
3      bangalore


area tabel
id     name          fk
1      madhapur      1
2      hi-tech       1
3      kondapur      1
4      adayar        2
5      ECR road      2
6      anna nagar    2
7      whitefiled    3
8      MGM           3



so i need name in region table as root node and the respective fk
names in area table as child nodes(i dont need subchild node )..



how can i use acts_as_tree for this table,are is there an alternative
to do this
This topic is locked and can not be replied to.