- If our model is Faq::UserType, then we generates the dashboard with:
rails generate administrate:dashboard faq/user_type
This generates:
Running via Spring preloader in process 21074
create app/dashboards/user_type_dashboard.rb
create app/controllers/admin/user_types_controller.rb
- Make the module folder inside controllers and dashboard:
mkdir app/controllers/admin/faq/
mkdir app/dashboards/faq/
- Move the administrate controller to module folder:
mv app/controllers/admin/user_types_controller.rb app/controllers/admin/faq/
- Move the dashboard to module folder:
mv app/dashboards/user_type_dashboard.rb app/dashboards/faq/
- Add namespace to routes:
namespace :admin do
namespace :faq do
resources :user_types
end
end