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
  • #1931
Closed
Open
Issue created Mar 05, 2021 by Administrator@rootContributor

Administrate::ResourceResolver always singularizes namespace.

Created by: timobleeker

  • What were you trying to do? Make a dashboard for a namespaced resource: Users::Preference

  • What did you end up with (logs, or, even better, example apps are great!)? uninitialized constant User::PreferenceDashboard

  • What versions are you running?

    • Rails 6.0.3
    • administrate 0.13.0

From reading the source of the Administrate::ResourceResolver, it's always going to singularize the namespace:

    def controller_path_parts
      controller_path.split("/")[1..-1].map(&:singularize)
    end

I don't understand why it would want to signularize the namespace part of the controller path. To my knowledge it is not possible to have Foo::Bar in foos/bar.rb. Would it not make more sense to just singularize the last part of the controller path?

Am I missing something, or is this a bug in administrate?

Assignee
Assign to
Time tracking