emberjs/ember.js — pull request #4376 by raytiley (2014-02-16 04:59:47+00:00)
Title: Disregard  currentWhen if there are too many contexts for handler

This fixes the strange active behavior in issue #4277 and provides a better fix for #4201.

The issue in #4201 was that using the shorthand for `parent.index` route would throw an error if `parent.index` took a dynamic segment and a context was passed to `link-to` for that segment. The original fix for #4201 was too disregard contexts all together when the requested handler isn't the same as the handler the `link-to` will actually transition to. This caused undesirable behavior as demonstrated in #4277.

This fix reverts what was done in #4201 and now passes all the contexts to `router.isActive`. The change is that if there are too many contexts passed in for the requested handler we disregard the `currentWhen` handlerName and actually use the full handler name to determine `active` status.

cc\ @machty