|
BatchDelete
Batch delete many records by one click.
IntroductionAfter having BatchCreate, some guy asked how can I batch delete. Now it comes. With the support of the MultiSelectList, you can delete many records by one click. InstallSame as BatchCreate Usagecontrollers/sneakers_controller.rb active_scaffold do |config| # batch_delete based on multi_selec config.add_macro 'batch_destroy', :label => 'Delete', :method => :delete, :security_method => :delete_authorized? end Notice: the action name is batch_destroy instead of batch_delete. Demohttp://demo.activescaffold.com.cn/sneakers BTW, the ActiveScaffold has been localized to Chinese, but the Sneaker model was kept in English. The batch delete button is just beside Create with a lighting icon, which means it is a macro action. |
Sign in to add a comment