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
  • #481
Closed
Open
Issue created Feb 22, 2016 by Administrator@rootContributor

Custom controller is assumed to have a related model

Created by: naps62

I want to have an admin dashboard where I show some useful data. This is not necessarily tied to a single resource model

My first attempt was to create a Admin::OverviewController with an index action. However, the sidebar calls Administrate::Namespace.new(namespace).resources, which, I eventually discovered, is computed by listing all controllers for which administrate has routes. So it would end up looking for an Overview model

I generated the sidebar template, and monkey patched it with this:

(Administrate::Namespace.new(namespace).resources - [:overview]).each to explicitly remove the overview from the list of resources. This is ugly as hell though

Is there currently a better solution for this?

Assignee
Assign to
Time tracking