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