My favorites | Sign in
Project Logo
                
Search
for
Updated Apr 09, 2008 by caoweiyuan
BatchDelete  
Batch delete many records by one click.

Introduction

After 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.

Install

Same as BatchCreate

Usage

controllers/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.

Demo

http://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
Hosted by Google Code