   @replaceState: (state, title, url) ->
     window.history.replaceState(state, title, url)
 
-  fetchReplacement = (url, partialReplace, onLoadFunction, replaceContents) ->
+  fetchReplacement = (url, options) ->
     triggerEvent 'page:fetch', url: url.absolute
 
     xhr?.abort()

      if xhr.status >= 500
        document.location.href = url.absolute
      else
        Turbolinks.loadPage(url, xhr, partialReplace, onLoadFunction, replaceContents)

    xhr.onloadend = -> xhr = null
    xhr.onerror   = ->

      resetScrollPosition() unless options.onlyKeys.length
      options.callback?()

    fetchReplacement url, options

  @pushState: (state, title, url) ->
    window.history.pushState(state, title, url)
