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
  • #1709
Closed
Open
Issue created Jul 13, 2020 by Administrator@rootContributor

Is there a workaround for a model named "Page"?

Created by: milkfarm

I didn't find any documentation about reserved names for the administrate gem. Is there a workaround for a model named Page? When I create a standard dashboard (rails g administrate:dashboard Page), I encounter a variety of errors. For example, when trying to access the pagination links on the index view.

NoMethodError in Admin::PagesController#index
undefined method `fetch' for "2":String

def order
  @order ||= Administrate::Order.new(
    params.fetch(resource_name, {}).fetch(:order, "created_at"),
    params.fetch(resource_name, {}).fetch(:direction, "desc")
  )
end

The issue relates to the paging/sorting information being stored under the same param key as the resource.

Rails: 6.0.3.2 administrate: 0.13.0

Assignee
Assign to
Time tracking