-
Notifications
You must be signed in to change notification settings - Fork 66
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
HABTM relation causes NameError - uninitialized constant Model1::HabtmModel2 #123
Comments
You can whitelist the models that appear as described here: |
Thanks Jonathan. Michael this looks like this is related #112 (or at least @ernsheong's issue). Let me know if setting config.models works for you, and I"ll close this one and track the issue there. |
Yup I can confirm this works
|
Looking at this again, I think @ernsheong's and your issue is different to the one @mfa123 originally reported at #112, so I think it deserves its own issue. |
I am also having this problem. Coincidently the HABTM models in question are precisely the models that require much hands on administration. I hope this issue can be resolved because I am otherwise very excited about this project! |
Hey @cassidyclawson, so the good news is there's already a PR in for this with #126 :) but it might be a little while before this make is into the codebase and a released version of the gem. However there's an easy workaround by configuring which models to display: https://github.com/upmin/upmin-admin-ruby/wiki/Configurations as @ernsheong mentioned. Let me know how you get on! |
Exclude HABTM from Upmin::Configuration.models to address #123
when I visit
/admin
I get the errorNameError - uninitialized constant Artist::HabtmEvents:
stack trace: https://gist.github.com/Meekohi/199d798b109a8a5212fe
Although using them on the rails console seems to work fine.
The text was updated successfully, but these errors were encountered: