Skip to content

Instantly share code, notes, and snippets.

@nykma
Last active September 5, 2018 03:53
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