gregbell/active_admin — pull request #2163 by macfanatic (2013-05-03 15:59:26+00:00)
Title: New #routing_constraint setting for advanced namespace routing options

Advanced routing configuration per namespace, or globally, with a new setting. Inspired when loading engines into my parent application with ActiveAdmin, client wanted each engine to be available at it's own URL.

The old URL "http://www.mygreatapp.com/some_engine" is now served up at "http://engine.mygreatapp.com/" with the following config change:

```ruby
ActiveAdmin.setup do |config|
config.namespace :some_engine do |e|
e.routing_constraint = { subdomain: "engine" }
end
end
```

The new setting with accept a Proc, Hash, Class or Class instance - any object that responds to `#matches?`.