Página personalizada no ActiveAdmin

É uma folha de cheats. Eu o criei para marcar a solução de trabalho, porque é meio raro encontrado.

ActiveAdmin.register_page 'CustomPage' do
menu parent
: "Main"

content
do
count
= SomeModel.count
render partial
: 'admin/custompage/upload_form', locals: {count: count}
end

page_action
:import, method: :post do
imported
= Import.new(params[:file].path)
imported
.import
redirect_to admin_custompage_path
, notice: "Imported #{imported.element_count}."
end
end
h2 Import XML
h3

' Total:
b= count


= form_tag(admin_custompage_import_path, multipart: true) do

= file_field_tag '
file', required: 'required'
= submit_tag '
Upload', name: nil