Skip to content

Instantly share code, notes, and snippets.

@kylebragger
Created February 7, 2013 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kylebragger/4735123 to your computer and use it in GitHub Desktop.
Save kylebragger/4735123 to your computer and use it in GitHub Desktop.
# USER.boldfaced.net
constraints(Subdomain) do
get 'work/:id' => 'work_items#show', as: :user_work
get '' => 'users#profile', as: :user_profile
end
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