Skip to content

Instantly share code, notes, and snippets.

@ciniglio
Created February 19, 2013 17:38
Show Gist options
  • Save ciniglio/4988057 to your computer and use it in GitHub Desktop.
Save ciniglio/4988057 to your computer and use it in GitHub Desktop.
Staging URL helper
def self.staging_url(url)
if Rails.env == "staging"
url.sub('.', '-staging.')
else
url
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment