I need to create some routes for my blog website such that normal user can only read the posts and products. while super admin creates admins to moderate posts. How can i achieve that in rails? I want myapp.com/admin to bring me to log in page for admins. Only super admin can manage moderators.
So far, I have a controller in 'app/controller/admin/home_controller' which has index action for viewing all posts and users for admin.
Try adding a before filter before your action so that each time a admin try to hit that url he/she should get redirected to admin_login_url