Mort Goldman on 20 Sep 2007 18:36:58 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

[PhillyOnRails] RESTful controller overloading


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. 

 

I want to create each of the subtypes as resources, so that I could for example request a GET on Students.  At the same time, I’d like to only have one controller.  Has anyone tried doing this?  Seems there should be an easy way to set up routes to handle this, but I’m not seeing it.

 

Thanks,

Mort

 

Mort Goldman

Principal

408 West, LLC

www.408west.com

mort.goldman@408west.com

610.715.9006

 

_______________________________________________
To unsubscribe or change your settings, visit:
http://lists.phillyonrails.org/mailman/listinfo/talk