On 1 February 2012 19:10, Agis A. <[email protected]> wrote:
> Just to be more specific: I want to have parent and child "Sections". A
> section can be a parent section (top-level section) or a child of another
> section, or a child of another child section. Then, to-dos, messages & ideas
> can belong either to a parent or to a child category.
>
> For example, consider this hierarchy:
>
> Site design (parent section, doesn't belong anywhere)
> -Footer design
> ----Footer links styling
> ----Social media bookmarks
> -Header design
> ----Logo design
> ----Menu design
> Advertising & Promotion
> -Social media advertising
> ----Twitter
> ----Facebook
> -Offline advertisting
> etc...
>
> Looking at this table, I think it would be more flexible to have all the
> sections in one table and maybe use a "Parent_id" column in the same table.
> Am I missing something?

Google for
rails self referential
and you will find many links, rails casts and so on that use this
technique.  It is very common.

Colin

>
> Thanks in advance.
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/rubyonrails-talk/-/dX0JXXejQMQJ.
>
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.



-- 
gplus.to/clanlaw

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to