我需要在索引操作的相关视图中显示一个表单,就在记录列表的上方;我的失败尝试(如下所示)将我的面板和包含的表单放入 AA用于批处理操作的表单中,因此我的<form ..>
标记已被删除。
ActiveAdmin.register MyModel do
index do
selectable_column
column :id
...
column :created_at
column :updated_at
actions
panel 'Create a new Listing Featureds' do
render partial: 'new_multi_form'
end
end
end
我的面板是这样的:
<form action="<%= create_many_backend_listing_featureds_path %>" method="post">
<fieldset class="inputs">
<ol>
<li class="select input required">
<%= label_tag :venue %>
<%= select_tag :venue_id, options_from_collection_for_select(Venue.all, :id, :name), include_blank: true %>
</li>
<li class="select input required">
<%= label_tag :area_id %>
<%= select_tag :area_id, options_from_collection_for_select(Area.all, :id, :name), include_blank: true %>
</li>
</ol>
</fieldset>
<%= submit_tag("Create") %>
</form>
所以我的问题是:如何在Active Admin的索引操作中显示表单?