gregbell/active_admin — pull request #2246 by Daxter (2013-06-03 23:47:35+00:00)
Title: Allow DB-specific scopes & filters by delaying until HTTP request

You can use this like so:
```ruby
ActiveAdmin.register Post do
delay do
Post.pluck(:category).each do |cat|
scope(cat) { Post.where category: cat }
end
end
end
```

TODO:
+ add tests
+ move the code into a module to `include` into ResourceDSL
+ this is broken because it will add scopes and filters multiple times,
once per HTTP request