emberjs/ember.js — pull request #3169 by joshtabak (2013-08-21 23:58:11+00:00)
Title: Assert a controller "needs" the controller its binding to

Reading from this binding will fail silently if the controller containing the code does not "needs" the otherController

App.FirstController = Ember.Controller.extend({
needs: [],
myBinding: 'controllers.otherController.property'
})

I think it's very important to have good warnings for gotchas like this. It's just too easy for somebody unfamiliar with the framework to get stuck and not know why this property isn't exposed correctly.

I'm not really happy with my implementation of the assert - is there a better way to tell what type of object we're dealing with, rather than introspecting the string directly?