module ActiveSupport::Dependencies

def loadable_constants_for_path(path, bases = autoload_paths)

file.
constant paths which would cause Dependencies to attempt to load this
Given +path+, a filesystem path to a ruby file, return an array of
def loadable_constants_for_path(path, bases = autoload_paths)
  path = $` if path =~ /\.rb\z/
  expanded_path = File.expand_path(path)
  paths = []
  bases.each do |root|
    expanded_root = File.expand_path(root)
    next unless expanded_path.start_with?(expanded_root)
    root_size = expanded_root.size
    next if expanded_path[root_size] != ?/.freeze
    nesting = expanded_path[(root_size + 1)..-1]
    paths << nesting.camelize unless nesting.blank?
  end
  paths.uniq!
  paths
end