Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Issues
  • #720
Closed
Open
Issue created Dec 27, 2016 by Administrator@rootContributor

DashboardGenerator does not update routes

Created by: mcmire

Apologies if someone else has already submitted this.

If you use rails g administrate:dashboard to create a new dashboard file, the new dashboard is not added to config/routes.rb, and thus it does not appear automatically in the sidebar. I realize this is probably on purpose; after all, how is the generator going to know where in the routes file it needs to add a new line, especially if you've rearranged things? If that's the case, then I feel like the generator needs to display some kind of instructions when you run it to inform the user that they need to do this manually. For instance, if you ran rails g administrate:dashboard Foo, you would see something like:

As you can see above, Administrate created files for the new dashboard. However, right now you won't see a new item in the sidebar. To make that happen, you'll need to add a new line to your existing admin-related routes. For instance:

resources :foos
Assignee
Assign to
Time tracking