Skip to content

Instantly share code, notes, and snippets.

@revans
Created April 14, 2011 16:31
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save revans/919857 to your computer and use it in GitHub Desktop.
def determine_domain(domain)
domain = domain.split(':').first # if you have to worry about ports
case domain
when 'open-dev.heroku.com' then ...
when 'open.lifechurch.tv.dev' then ...
else
...
end
end
determine_domain(request.env['HTTP_HOST'])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment