So, moral of the story: Don't use namespaced (with modules) STI models with AA, or IH.
~Nic
UPDATE: I was sent this from an anonymous commenter. Excellent tip:
This actually works if you create a dummy class for your Namespaced model. For example do something like this: ActiveAdmin.register Parent::Child, as "MyClass". And then create a dummy model called MyClass as class MyClass < Parent::Child. This works.UPDATE: I was sent this as well by another commenter:
This ugly shit works:
ActiveAdmin.register ::MyModule::Base, :as => 'MyModel'
without Dummy models
5 comments:
This actually works if you create a dummy class for your Namespaced model. For example do something like this: ActiveAdmin.register Parent::Child, as "MyClass". And then create a dummy model called MyClass as class MyClass < Parent::Child. This works.
Wow, awesome workaround. Thanks for the tip!
REHASH
AND
REPENT
Wow, who could that be?
This ugly shit works:
ActiveAdmin.register ::MyModule::Base, :as => 'MyModel'
without Dummy models
Post a Comment