gregbell/active_admin — Issue #775: Filter :as => :collection
Author: pcreux
Created: 2011-11-22 10:04:06+00:00
State: open
Labels: Feature

I have about 100+ cats, so I made a Cat Management app powered by ActiveAdmin.

I had to write something like:

```ruby
ActiveAdmin.register Cat do
# Display a drop down
filter :breed, :as => :select, :collection => proc { Cat.select("DISTINCT breed").map(&:breed).sort }
end
```

Meh.

I want to write this instead:

```ruby
ActiveAdmin.register Cat do
# Display a drop down
filter :breed, :as => :collection
end
```