ezdash - D4uS1/ez-on-rails GitHub Wiki
If your application is modularized using namespaces you can use this generator to create dashbords holding tiles with links to the actions in those namepsaces of your application.
rails generate ez_on_rails:ezdash Managemet
This will provide a dashboard that is accessible over https://your-application.com/management/dashboard. The dashboard holds tiles having links to actions or resources that were found in the management namespace.
The dashboards is rendered using a dash info method given in the generated helper file.
The concept of using dashboards is explained on the dashboard concept page. There you can read about the possibility to change the behavior and appearance of the dashboards.
The generated dashboard is per default only accessible for super admins. This is because the generator appends the restriction to the db/seeds.rb file. To change this behavior have a look at the permission system concept and change the generated restriction in the seeds to your needs.
The only parameter you must pass is the name of the namespace.
- The controller is located in app/controllers//dashboard_controller.rb
- The view is located in app/views//dashboard/index.html.slim
- The view is written using slim
- The helper holding the dash info to customize the dashboard is located in app/helpers//dashboard_helper.rb
- The files to use the i18n translations are located in the config/locales directory.
- The spec to test your dashboard is located in spec/requests//dashboard_spec.rb
- Appends the default restriction to be only able to use the dashboard as super admin to the db/seeds.rb file
- Appeds the route to acces the dashboard to the config/routes.rb file