开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜