I am trying to extend the ActiveAdmin interface and add another reusable resource to the menu with a Rails plugin.
I have created a new full engine:
# Not mountable because it build up on ActiveAdmin
rails plugin new activeadmin-files --full
Then I added a file to my engine under lib/activeadmin-files/admin/files.rb
:
ActiveAdmin.register_page "Files" do
menu :label => "File Management"
content do
para "Hello File Manager"
end
end
I followed the description from the ActiveAdmin Wiki to add a resource to an engine. I modified engine.rb
as follows:
module ActiveadminFiles
class Engine < ::Rails::Engine
initializer :files do
ActiveAdmin.application.load_paths += Dir[File.dirname(__FILE__) + 'activeadmin-files/admin']
end
end
end
The only difference is that my engine is a full engine and the one on the wiki page is a mountable engine.
Problem: The page defined in files.rb
does not appear when I open the ActiveAdmin interface. What am I missing here?