class Sprockets::Context
def root_path
current file is `app/javascripts/foo/bar.js`, `root_path` would
If `app/javascripts` and `app/stylesheets` are in your path, and
Returns the environment path that contains the file.
def root_path environment.paths.detect { |path| pathname.to_s[path] } end