Skip to content

Instantly share code, notes, and snippets.

@deepthawtz
Created March 17, 2009 07:00
Show Gist options
  • Select an option

  • Save deepthawtz/80370 to your computer and use it in GitHub Desktop.

Select an option

Save deepthawtz/80370 to your computer and use it in GitHub Desktop.
# ==== Parameters
# *path::
# The relative path (or list of path components) to a directory under the
# root of the application.
#
# ==== Returns
# String:: The full path including the root.
#
# ==== Examples
# Merb.root = "/home/merb/app"
# Merb.path("images") # => "/home/merb/app/images"
# Merb.path("views", "admin") # => "/home/merb/app/views/admin"
#
# @public
def root_path(*path)
File.join(root, *path)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment