Skip to content

Instantly share code, notes, and snippets.

@chris-roerig
Last active January 25, 2016 02:04
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 chris-roerig/4141f896405d8d2ce7c7 to your computer and use it in GitHub Desktop.
Save chris-roerig/4141f896405d8d2ce7c7 to your computer and use it in GitHub Desktop.
A little file path utility
# usage:
# safe_path "app/controllers"
def safe_path(path = "")
File.join(*path.split("/"))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment