I’ve created a category controller in the admin namespace, and have another category controller for the actions which won’t modify a category. I’m doing this because I need the admin index and show actions to show drastically different templates in the administrative section of the site compared to the front-facing views. However, Rails by default routes from admin categories new, to non-admin categories create. How can I make new and edit call create and update respectively in the admin categories controller? If anyone has suggestions for a better controller layout, I’d be grateful for some insight to good design practices as well.
I’ve created a category controller in the admin namespace, and have another category controller
Share
you can use routes namespaces. It will help you to keep admin’s logic isolated