emberjs/ember.js — pull request #4312 by jayphelps (2014-02-06 03:07:27+00:00)
Title: [BUGFIX beta] link-to should generate the url if it eagerly updates it, not use the href because it includes rootURL. Fixes #1244

`link-to` used to let the transition [update the URL](https://github.com/emberjs/ember.js/blob/ba40ac334fba5bee67b6fc0e1fefbe492b00627c/packages/ember-routing/lib/vendor/router.js#L760), but https://github.com/emberjs/ember.js/pull/4122 made `link-to` request a URL update with the router, providing it's own URL based of the `href` cp.

Unfortunately, the `href` includes the `rootURL`, if one is used, which the router, nor the `Location` classes are expecting it to already have, so they prepend it again.

This PR makes `link-to` **always** generate the URL, just like [the transition does](https://github.com/emberjs/ember.js/blob/ba40ac334fba5bee67b6fc0e1fefbe492b00627c/packages/ember-routing/lib/vendor/router.js#L760).

Fixes #1244

I need to write a test for this still, but I can't tonight. Figured I would at least get this up.