class Middleman::Application

def full_path(path)

Returns:
  • (String) - Path with index file if necessary

Parameters:
  • path (String) -- Request path

Other tags:
    Private: -
def full_path(path)
  cache.fetch(:full_path, path) do
    parts = path ? path.split('/') : []
    if parts.last.nil? || parts.last.split('.').length == 1
      path = File.join(path, index_file) 
    end
    "/" + path.sub(%r{^/}, '')
  end
end