Forum: Ruby on Rails multiple sub categories (parent-child)

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.
David Ang (Guest)
on 2006-03-10 11:49
hi.

base from the cookbook example, where each categories can have many
recipes,

id like the categories to have multiple sub categories, unlimited
levels.

please show some code, as i am new to Ruby and Ruby On Rails.

thanks
Jonathan V. (Guest)
on 2006-03-10 14:07
(Received via mailing list)
Do you want the categories to behave like a tree? If so, check out
acts_as_tree.

http://api.rubyonrails.org/classes/ActiveRecord/Ac...

-Jonathan.
This topic is locked and can not be replied to.