2013-12-20 94 views
2

複選框不顯示,並且批量操作下拉列表對於我的所有ActiveAdmin頁面都呈灰色顯示。我admin/dashboard.rbActiveAdmin複選框和批處理操作不可用

ActiveAdmin.register_page "Dashboard" do 

    menu :priority => 1, :label => proc{ I18n.t("active_admin.dashboard") } 

    content :title => proc{ I18n.t("active_admin.dashboard") } do 
    div :class => "blank_slate_container", :id => "dashboard_default_message" do 
     span :class => "blank_slate" do 
     span I18n.t("active_admin.dashboard_welcome.welcome") 
     small I18n.t("active_admin.dashboard_welcome.call_to_action") 
     end 
    end 

    end # content 
end 

一個例子Admin.registerVotes

ActiveAdmin.register Vote do 
    permit_params :ip_address, :weight, :response_id 

    index do 
    column :response 
    column :weight 
    column :ip_address 
    end 

    form do |f| 
    f.inputs do 
     f.input :response 
     f.input :ip_address, :as => :string 
     f.input :weight 
    end 
    f.actions 
    end 
end 

的Gemfile項:gem 'activeadmin', github: 'gregbell/active_admin'

回答

12

您需要添加selectable_column所以有一種方法可以選擇記錄對應用批處理動作:

index do 
    selectable_column 
    # your columns here 
    actions 
end