since there's a problem if I decide to use a seperate table for the
subsections, because the to-dos etc maybe also in a section. So this is my
question for now: should I have a separate table for subsections or should
I do it with one table only (sections)? In other words, I want to implement
a "nested sections" system.
>
Colin's suggestion for using "self referential" techniques is definitely
recommended. Additionally, from your description it sounds like you could
possibly have "to do"s and other items associated with with a range of
objects in our site. If you do go down this path, you will want to
investigate Rails' polymorphic relations. This would allow you to have "to
do"s associated with sections, subsections, articles, orders, accounts,
etc. I've used polymorphism to make one "picture" model available for
association with users, articles, posts, products, etc. and it works pretty
well.

Don

--
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/-/K6Am3ivcc7IJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 4 of 4 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedFeb 1, '12 at 6:32p
activeFeb 2, '12 at 3:33p
posts4
users3
websiterubyonrails.org
irc#RubyOnRails

3 users in discussion

Agis A.: 2 posts Don: 1 post Colin Law: 1 post

People

Translate

site design / logo © 2022 Grokbase