Topic: Design decision - handling multiple models in an admin section

I have a part of a site that has categories and the categories have one or more resources. I have a model for categories and resources.

Should I have a single admin controller for creating both categories and resources or should I create two controllers one for categories and another for resources and then reference the resource controller from the category one?

All other things being equal it seems like one controller would be logical.

Re: Design decision - handling multiple models in an admin section

If you'll always be adding resources when you create a category then you might as well have just one controller. Or have two controllers anyway but provide an easy way to add resources from the category creation page.

vinnie - rails forum admin

Re: Design decision - handling multiple models in an admin section

thanks vin,

the resources are only added/edited by the category. so, I think the admin controller should do the job. i can add an action called something like add_resource which I can call from the category edit page.

How do I generate the pages for editing the resource? do I need to create those manually?