-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rails Admin doesn't handle STI to single table #3373
Comments
Could you provide all relevant information like the |
to point it out again:
|
if you want to generate the other models, here are the migrations:
|
this is my rails admin config:
To check for admin permissions I set up these methods in my User model:
|
Ruby -v 2.7.2 |
Hmm, I see nothing unusual. This is the repo I've created trying to reproduce this issue, can you make that happen by using this? |
I was able to run the repo you provided, but then I tried creating a new one more similar to the one I have and the error is the same. You can find the repo here: https://github.com/Naokimi/rails-admin-issue-3373 The main differences are:
BUT when I kept all the models inside Is there a way how to make it work while at the same time keeping models in folders for better readability? |
Thanks, I was able to track down the issue. First, you need to use config.eager_load_paths += %W(#{Rails.root}/app/models/users)
But that alone does not solve this issue, there was a glitch in RailsAdmin which ignores the application-specific In short, using |
Sorry for coming back to this after so long, but just wanted to say that it still doesn't work :( you can find the code in https://github.com/Naokimi/rails-admin-issue-3373 |
The fix is not released yet, you need to use the master branch. gem 'rails_admin', github: 'sferik/rails_admin' |
I have 2 different classes inheriting from User but saving in the same table:
I'd like to add a
VendorStamp
using rails admin, but when I go to the tab, the relation is missing, which of course throws an error when trying to saveI also tried to explicitly tell it to look for a vendor (see below), but with no luck
The text was updated successfully, but these errors were encountered: