Created
February 7, 2013 23:16
-
-
Save kylebragger/4735123 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# USER.boldfaced.net | |
constraints(Subdomain) do | |
get 'work/:id' => 'work_items#show', as: :user_work | |
get '' => 'users#profile', as: :user_profile | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Subdomain | |
def self.matches?(request) | |
case request.subdomain | |
when 'www', '', nil | |
false | |
else | |
true | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment