使用Rails 3.2.12,active_admin 0.6.2/0.6.3,我有我的ActiveAdmin初始化禁用批處理動作:如何刪除activeadmin的批處理動作路線
config.batch_actions = false
然而,rake routes
顯示了批量行動路線我所有註冊的ActiveAdmin控制器:
$ rake routes | grep batch
batch_action_admin_admin_users POST /admin/admin_users/batch_action(.:format) admin/admin_users#batch_action
batch_action_admin_members POST /admin/members/batch_action(.:format) admin/members#batch_action
batch_action_admin_sales_agents POST /admin/sales_agents/batch_action(.:format) admin/sales_agents#batch_action
batch_action_admin_comments POST /admin/comments/batch_action(.:format) admin/comments#batch_action
如何刪除這些路由?
我試圖猴補丁this code有:
post :batch_action if config.batch_actions
,但沒有奏效。
編輯:下面的答案都說得好。有一個PR fixing this
只是想指出,艾薩克提交了一個修復這個修補程序,它已被合併到主。謝謝Issac! –