我安装
gem 'activeadmin', github: 'gregbell/active_admin', branch: 'rails4'
并且它工作正常但是..当我单击某些资源的复选框时,批处理操作不会更改为启用。我有:
index do |description|
selectable_column
column :id
column :user
column :description
default_actions
end
batch_action :destroy, :confirm => "delete ??", :plural_model => "descriptions" do |selection|
Profile.find(selection).each { |d| d.reset_description! }
redirect_to collection_path
end
和批处理操作:销毁。活动管理员在rails 4中是否正常工作?
答案 0 :(得分:1)
出现同样的问题,OP的第一条评论为我解决了这个问题: 添加
//= require active_admin/base
到
active_admin.js
答案 1 :(得分:0)
我只需添加selectable_column:
index do
selectable_column
id_column
column :title
column :value
column :featured
column :page_title
selectable_column #<--- this one works fine
actions
end
答案 2 :(得分:0)
我的问题是本地服务器上没有加载所需的Javascript文件。当推向生产时,一切都运转良好。