emberjs/ember.js — pull request #2886 by machty (2013-06-25 06:28:24+00:00)
Title: Redirect preserves resolved models from active transition

Closes #2874.

Merges in latest router.js, in particular
https://github.com/tildeio/router.js/pull/27

This restores pre-facelift behavior where a redirect on a dynamic route
to another child route will 'soak up' the resolved model and
not require that it be passed as a context object in the
redirecting `transitionTo`.

Thanks to @teddyzeenny for the failing test case.

Also, this allows `afterModel` to swap out the resolved model
of the present route by setting
`transition.resolvedModels[routeName]`. The use case is not
super common afaik, so this approach is better than making it
so that the return value of `afterModel` replaces the resolved
model that'll end up getting passed to the controller.

/cc @ghempton and @ebryn