Assuming the following:
假设如下:
ActiveAdmin.register Section do
menu :label => "Sections used in the menu"
menu :parent => "CMS", priority: 1
permit_params :name,:section_type, :visible,sections: [], sections_id: []
sortable tree: true,
sorting_attribute: :position,
max_levels: 1,
collapsible: true
index as: :sortable do
selectable_column
id_column
column :name
column :section_type
column :visible do |section|
section.visible ? status_tag("yes",class: :ok) : status_tag("no")
end
actions
end
end
ActiveAdmin.r