Rails 3 Different Routes File Depending on Subdomain
I building a Rails 3 app that has a couple of different su开发者_开发百科bdomains which need to have their own set of routes specific to that subdomain. How do I set this up? I know that I can pass something like :constraints { :subdomain => "api" } to an individual route but I don't want to have to do this for each resource/route in my application.
Is there a way to either load a different routes file depending on my subdomain or group subdomain routes into a block?
I'd simply set constraints on the routes as described here.
精彩评论