Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Doesn't work with namespaced models #63
I often use namespaced models when using STI, (ie rails generate model Foo::Bar --parent=Foo)
When I try to load upmin in one of these projects, I get NameError on line 14 of app/views/layouts/upmin/_navbar.html.haml (using gem version 0.1.0). Testing in rails console shows this is triggered when it tries to list one of my namespaced models.
I am pretty sure that this should cover all namespace cases, but if you create your own admin model (eg AdminBlah) you will need to override the class method
I did run into one other weird issue where basically some gems like ActsAsTaggableOn make it insanely annoying to pre-load their classes, so the ActsAsTaggableOn::Tag class may not show up in the admin pages until you view a model instance that has a tag, but if you go directly to the URL for the model it will still work. It just won't show up in the navbar prior to then. I'm not sure how to resolve that, since it might require custom code for tons of gems.