On 19 August 2010 16:05, Fritz Trapper <[email protected]> wrote: > Is it possible to define a subclass for a model, that defines additional > data columns, which are stored in a separate table? > > Is there any description, how to do this?
You can certainly subclass a model. Then the subclass could have a :has_one relationship to another model with the extra columns which the superclass doesn't have. If you want to make it transparent, you can delegate the calls for the extra tables in the associated model, so instead of: foo.bar.extra_value you can call: foo.extra_value -- 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.

