On 3 March 2011 21:10, Yoram <[email protected]> wrote:
> I'm struggling with the following problem:
>
> I have a class, call it 'School'.
> An instance of School can have all sorts of assets, such as 'Books',
> 'Tables', 'Chairs', 'Teachers'.
> Each of these asset types is modeled by it's own model and has a
> corresponding table in the db. So, there is a table for 'Chair,
> another for 'Teacher' and so on.
> In summary, in the abstract, each school has_many assets and each
> asset belongs_to a school.

Have you looked at Single Table Inheritance?

Colin

-- 
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