js/libs/ember-1.5.1.js
function() {
    // target may be either another controller or a router
    var target = get(this, 'target'),
        method = target.replaceRoute || target.replaceWith;
    return method.apply(target, arguments);
  }
function() {
    // target may be either another controller or a router
    var target = get(this, 'target'),
        method = target.replaceRoute || target.replaceWith;
    return method.apply(target, arguments);
  }
Transition into another route while replacing the current URL, if possible.
This will replace the current history entry instead of adding a new one.
Beside that, it is identical to `transitionToRoute` in all other respects.

```javascript
aController.replaceRoute('blogPosts');
aController.replaceRoute('blogPosts.recentEntries');
```

Optionally supply a model for the route in question. The model
will be serialized into the URL using the `serialize` hook of
the route:

```javascript
aController.replaceRoute('blogPost', aPost);
```

If a literal is passed (such as a number or a string), it will
be treated as an identifier instead. In this case, the `model`
hook of the route will be triggered:

```javascript
aController.replaceRoute('blogPost', 1);
```

Multiple models will be applied last to first recursively up the
resource tree.

```javascript
App.Router.map(function() {
this.resource('blogPost', {path:':blogPostId'}, function(){
this.resource('blogComment', {path: ':blogCommentId'});
});
});

aController.replaceRoute('blogComment', aPost, aComment);
aController.replaceRoute('blogComment', 1, 13);
```

It is also possible to pass a URL (a string that starts with a
`/`). This is intended for testing and debugging purposes and
should rarely be used in production code.

```javascript
aController.replaceRoute('/');
aController.replaceRoute('/blog/post/1/comment/13');
```

@param {String} name the name of the route or a URL
@param {...Object} models the model(s) or identifier(s) to be used
while transitioning to the route.
@for Ember.ControllerMixin
@method replaceRoute