阅读背景:

active_admin-sortable_tree在尝试使用它时会导致错误

来源:互联网 

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



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: