Skip to content

Instantly share code, notes, and snippets.

@dhh
Created November 28, 2008 15:49
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 dhh/30007 to your computer and use it in GitHub Desktop.
Save dhh/30007 to your computer and use it in GitHub Desktop.
def root(*args)
if defined?(RAILS_ROOT)
args.compact.empty? ? RAILS_ROOT : File.join(RAILS_ROOT, args)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment