emberjs/ember.js — pull request #2397 by teddyzeenny (2013-04-04 12:02:51+00:00)
Title: Add transitionToURL method

This allows us to transition to a specific URL without necessarily knowing the routes and models involved.

I found myself needing this several times when I need to save a specific route in order to transition to it later.

This comes in really handy when doing a login redirect on initial page load. We can now save the initial URL, and after signing in, we redirect the user to where they wanted to go in the first place.

```javascript
if (!signedIn) {
initialURL = this.router.get('url');
this.transitionTo('login');
}
```

And after logging in:
```javascript
this.transitionToURL(initialURL);
```

`transitionToURL` can be accessed from `Ember.Router`, `Ember.Route`, and `Ember.Controller`.