I need to embed my active admin pages in a parent application. The active admin page will be shown in an iframe and I need to remove the header and footer on the default index, show and edit pages if the url query param embedded=true.
I proceed like this in my active admin page :
ActiveAdmin.register Followup, as: 'Followup_affectation' do
controller do
def setLayout
if params['embedded'] == 'true'
@layout = false
else
@layout = 'active_admin'
end
end
end
And in some custom action
render template: "admin/followups/mytemplate.html.haml", layout: @layout
But I want to do it for index.
I tried
def index
render :index, layout: @layout
end
and
def index
super
render :index, layout: @layout
end
My index definition is really classic :
index do
id_column
column :step
column :cycle
column :tag_rfid
column :quoteline
column :product_name
column :location
column :active
actions
end
Thanks in advance for your help