Skip to content

Instantly share code, notes, and snippets.

@nykma
Last active September 5, 2018 03:53
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 nykma/8b528a430cb5dea45f99b0d3c9b2714c to your computer and use it in GitHub Desktop.
Save nykma/8b528a430cb5dea45f99b0d3c9b2714c to your computer and use it in GitHub Desktop.
Set subdomain of rack-test
def subdomain!(sub="test")
::Rack::Test::DEFAULT_HOST.replace "#{sub}.your_domain.com"
end
@nisanthchunduru
Copy link

Thanks for posting this.

@rgalindo33
Copy link

Made my day! thanks alot

@diegovillacis10
Copy link

Very useful! Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment