'Rails 6 - ActiveAdmin NameError in Admin::Users#index
I'm using ActiveAdmin and I want to be able to see all the user accounts (index page), The User model (User) is created with Devise and the Admin model (AdminUser) was created with ActiveAdmin.
When I want to view the index page of users I get this error:
NameError in Admin::Users#index
uninitialised constant User::Order
This is what I see in the terminal
ActionView::Template::Error (uninitialized constant User::Order):
1: # frozen_string_literal: true
2: insert_tag renderer_for(:index)
I know that I have access to the user model because the show page for a user works.
So /admin/users/:id works but /admin/users throws the error.
I honestly have no idea what it could be, already tried to change the name of the ActiveAdmin route with ActiveAdmin.register User, as: 'Gebruikers' do but the error persists. Also found this question NameError in Admin::Users#index but the solution didn't help.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
