1
votes

I'm having a problem with the Administrate dashboard gem and two of my models. One of the models is the default User model generated by Devise, and the other one is a simple STI model which, at the moment, doesn't have any custom functionality.

Below are the models code, as you can see they're defaults and nothing has been added yet. Schema wise, only the User model has a custom :type field which is required for STI.

User Model

class User < ApplicationRecord
  devise :database_authenticatable, :registerable,
         :recoverable, :rememberable, :trackable, :validatable
end

AdminUser Model

class AdminUser < User
end

The dashboard works 'fine', the only problem is that on the headers, or any text as a matter of fact, that were supposed to write Users or AdminUsers it says "User", I've added a picture so this makes a bit more sense.

enter image description here

I did notice the the urls were fine, for example the Users page url is /admin/users and the AdminUsers page url is /admin/admin_users, and so I can't really understand where this problem could be coming from.

Any ideas? Thanks

1
no ideas, but maybe open an issue on the administrate gem github page? github.com/thoughtbot/administrate/issues or check the existing issues there and that you're on the latest version of the gem?Sam Joseph

1 Answers

0
votes

Did you add the routes like below?

Rails.application.routes.draw do
  namespace :admin do
    resources :admin_users
    .......
  end