Skip to content

Instantly share code, notes, and snippets.

@pi3r
Created January 14, 2013 09:44
Show Gist options
  • Save pi3r/4528939 to your computer and use it in GitHub Desktop.
Save pi3r/4528939 to your computer and use it in GitHub Desktop.
App::Application.routes.draw do
scope module: 'company', constraints: ValidSubdomain do
root to: "home#index"
match 'login' => 'sessions#new', as: :login
match 'logout' => 'sessions#destroy', as: :logout
end
scope module: 'invalid_subdomain', constraints: InvalidSubdomain do
match '/*path' => 'home#index'
root to: 'home#index'
end
match 'login' => 'sessions#new', as: :login
match 'logout' => 'sessions#destroy', as: :logout
root to: "home#index"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment