Skip to content

Instantly share code, notes, and snippets.

@sergio-fry
Created January 19, 2010 17:36
Show Gist options
  • Save sergio-fry/281110 to your computer and use it in GitHub Desktop.
Save sergio-fry/281110 to your computer and use it in GitHub Desktop.
def expand_url(url)
if url.first == '/'
url = request.protocol + request.host + (request.port=='80' ? '' : ":#{request.port}") + url
end
url
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment