2012-08-14から1日間の記事一覧

Rails: namespace と subdomain を用いたルーティング

example.com でアクセスされた場合と m.example.com でアクセスされた場合で、異なるルーティングを適用したい場合、 scope constraints: { subdomain: '' } do resource :session end scope constraints: { subdomain: 'm' }, module: 'mobile' do resource…