Thanks for the tip Scott.
btw, I liked your intro to rails tutorials from a while back.
On 9/30/05, Scott Barron <scott-HDQKq3lYuGDk1uMJSBkQmQ@public.gmane.org>
wrote:>
>
> On Sep 30, 2005, at 11:42 AM, Alexander Aguilar wrote:
>
> > I''m sorry for the OT post but what is a good schema for
categories and
> > subcategories?
> > So if a main category is Movies and I would like sub-categories of
> > Comedy, Horror and Drama.
> >
>
> You might check out the acts_as_tree for this. On a very basic level,
> your categories
> table can have a parent_id column. Root nodes have this field set to 0
> while children
> have it set to the id of the root node, etc.
>
> --
> Scott Barron
> Lunchbox Software
> http://lunchboxsoftware.com
> http://lunchroom.lunchboxsoftware.com
> http://rubyi.st
>
> _______________________________________________
> Rails mailing list
> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org
http://lists.rubyonrails.org/mailman/listinfo/rails