code: function () {
          var rootURL = this._getRootURL();
          var path = this._getPath();
          var hash = this._getHash();
          var query = this._getQuery();
          var rootURLIndex = path.indexOf(rootURL);
          var routeHash, hashParts;
  
          Ember.assert('Path ' + path + ' does not start with the provided rootURL ' + rootURL, rootURLIndex === 0);
  
          // By convention, Ember.js routes using HashLocation are required to start
          // with `#/`. Anything else should NOT be considered a route and should
          // be passed straight through, without transformation.
          if (hash.substr(0, 2) === '#/') {
            // There could be extra hash segments after the route
            hashParts = hash.substr(1).split('#');
            // The first one is always the route url
            routeHash = hashParts.shift();
  
            // If the path already has a trailing slash, remove the one
            // from the hashed route so we don't double up.
            if (path.slice(-1) === '/') {
                routeHash = routeHash.substr(1);
            }
  
            // This is the "expected" final order
            path += routeHash;
            path += query;
  
            if (hashParts.length) {
              path += '#' + hashParts.join('#');
            }
          } else {
            path += query;
            path += hash;
          }
  
          return path;
        }
docs: @private
  
  Returns the current path as it should appear for HistoryLocation supported
  browsers. This may very well differ from the real current path (e.g. if it
  starts off as a hashed URL)
  
  @method _getHistoryPath