ruby - Rails, Combine multiple controllers into one interface -


Controller can include editing, creating and deleting users and posts. I will also include removal of comments. I have a user, admin (basically just login / control everything), comments, and posts so far. So how do I add them all to an admin panel?

An administrator should be processing each, instead you can put multiple controllers under the administrator namespace, / Post type of URL. However, in this way you have to write all your controllers and see the argument twice - once for the administrator, once for regular users Do not do anything with your choice of controller structure by adding any page to "a panel"

Based on the authorization, it is easiest to allow the resources to be edited / deleted. You can just keep the link on the sidebar or at the top of that panel. In this way, instead of being limited to a panel, you can browse the site like a regular user, except that you will see some more buttons and will have the ability to edit / delete things. This means that you can use all your previously written views and controllers.


Comments