I'm staying away from STI because I want to be able to add additional asset types over time, none of which share attributes with other assets. So - with STI, I could end up with a table that has hundreds of columns.
On Mar 3, 1:13 pm, Colin Law <[email protected]> wrote: > 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.

