Mike Mangino on 21 Sep 2007 01:09:01 -0000 |
Mort, I've done something like this. You can use map.resources :students, :controller => "people" You will probably need to have a type field in your form. This also will allow people to view students via the teachers resource. If that is a problem, you can pass a type of role parameter and use params [:role].classify.constantize to get the appropriate class to use for finders. Mike On Sep 20, 2007, at 1:38 PM, Mort Goldman wrote: I’ve got a few resources which are probably best represented as generalization hierarchies – as a simple example let’s say you have Students, Teachers, and Administrators who are all subtypes of Persons. In the standard denormalization process I collapsed the subtypes into the supertype and only created the model / table for Person/People with a role attribute.
_______________________________________________ To unsubscribe or change your settings, visit: http://lists.phillyonrails.org/mailman/listinfo/talk
|
|