I need to customize the active admin layout, but how can I do it?
You can override the active admin page layout by putting the following code in your config/intializers/active_admin.rb
file:
module AdminPageLayoutOverride
def build_page(*args)
within super do
render "shared/your_custom_view_partial"
end
end
end
ActiveAdmin::Views::Pages::Base.send :prepend, AdminPageLayoutOverride
In the above example, I have a custom view file at app/views/shared/_your_custom_view_partial.html.erb
location and I am injecting that in all of my active admin pages by the above code.