Im migrating from .net to rails and im a beginner. I have played around but cant figure out how can i create a base controller for admin namespace to share some functionality. I mean, where to put the Base class because i get errors for each try.
Thanks
Assume that you are using Rails 3.
You can do like this.
routes.rb
Here is the structure of controllers folder:
admin/base_admin_controller.rb:
You can add any methods that all admin controllers will share. Then just simply inherit the BaseAdminController class.
admin/users_controller.rb: