I'm trying to install activeadmin with two namespaces for the past 4 hours and am having no luck.
I want two namespaces. "admin" and "admin_unit".
I would assume that I would have the app/admin and app/admin_unit directories.
For the admin namespace, I would like to use the default devise authentication, and for the "admin_unit" namespace, I have a current_user method that I need to use.
I've tried wrapping all the config in the active_admin config with namespaces, and i've tried manually creating the files etc. but every time I have some problem.
Activeadmin has changed so much in the past year, I'm affraid half of the instructions i've seen are outdated. And none of them are complete. The documentation is only partially there on the namespacing.
Does anyone have some step by step instructions on installing these two namespaces from start to finish? I would be very appreciative for some help on this!
EDIT
When I go to start server (or in this case im trying to rake routes), I get this error:
Expected /app/active_admin/admin/dashboard.rb to define Admin::Dashboard (LoadError)
dashboard.rb has this in it:
ActiveAdmin.register_page "My Page", :namespace => :admin do
content do
para "Hello World"
end
end
I've also tried with no namespace:
ActiveAdmin.register_page "My Page" do
content do
para "Hello World"
end
end
FYI I added a "active_admin" directory, and put both namespaced directories in there. I added both to the loadpaths (thanks for that).
Does this error have anything to do with the new dashboard pages? I am going to look into how those work next.
Thanks guys! Thanks for your work Gregg, I have used AA on dozens of apps now and love it!
EDIT FIX
Ok, on the last issue, I found that taking the two activeadmin namespaced directories out of the "active_admin" directory that I created fixed the problem. Not sure what that wouldn't work... but oh well, i've spent enough cycles on this issue, and am ready to move on.
Hope that helps someone else..