, monkeypatching RouteController, , . .
(function(){
var orig = RouteController.extend;
RouteController.extend = function(newChild) {
var extendedTemplates = {};
if (!newChild.yieldTemplates) {
newChild.yieldTemplates = {};
}
_.extend(extendedTemplates, this.prototype.yieldTemplates);
_.extend(extendedTemplates, newChild.yieldTemplates);
newChild.yieldTemplates = extendedTemplates;
return orig.apply(this, arguments);
}
})();
-, - RouteControllers. , , yieldTemplates .