gregbell/active_admin — pull request #2486 by killthekitten (2013-09-20 18:00:27+00:00)
Title: Separate destroy and batch destroy action auth

ActiveAdmin default batch action (batch destroy) has an `:if` condition, which now is described by a proc:
```
proc{ controller.action_methods.include?('destroy') && authorized?(ActiveAdmin::Auth::DESTROY, active_admin_config.resource_class) }
```

This kind of auth check doesn't really help when you use block syntax to describe CanCan abilities. It is designed only for a basic use, like: `can :destroy, ModelName`, but not for a block.

We have a real need to permit access to the destroy and the batch destroy actions with a different rules. So my decision now is to change the name of the rule in that default `:if` condition, and as I see, it is the only right way to do it. Fix me if I wrong (I should be).