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
  • #2047
Closed
Open
Issue created Oct 06, 2021 by Administrator@rootContributor

undefined method `associative?' for nil:NilClass

Created by: dmc2015

  • What were you trying to do? Render show page in administrate dashboard

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

Showing /app_path/app/views/fields/has_many/_show.html.erb where line #21 raised:
undefined method `associative?' for nil:NilClass

image

I've check the associations between the model, dashboards and associated models and it looks right to me.

In the rails debugger the field looks like:

=> #<Administrate::Field::HasMany:0x00007fc3991eadc0 @attribute=:coates, @data=#<ActiveRecord::Associations::CollectionProxy [#<Coat id: 229, title: "brown jacket", description: ".".....
>>  

I am guessing there is an issue between coat and my dashboard model but it looks ok to me.

The error isn't very helpful.

  • What versions are you running?
    • Rails
      • rails (>= 5.2.1)
    • administrate
      • administrate (0.14.0)
Assignee
Assign to
Time tracking