robrobbins/Cord — Issue #1: Subscriptions object is not accessed from subscribe()
Author: aquam8
Created: 2011-10-12 23:17:54+00:00
State: open

With the current master code and

_TestView = Backbone.View.extend({
el: '#main',

subscriptions: {
'MyOtherView.added': 'sayHello'
},

initialize: function() {
this.subscribe();
},

sayHello: function (attrs) {
alert("Hello " + attrs.name);
}
});

var t = new _TestView();

This goes through Cord's subscribe() but fails to find the subscriptions definition (object).
It's looking in subscribe() argument but i feel it's missing this.subscriptions
like this:

if (!(subscriptions || (subscriptions = this.options.subscriptions) || (subscriptions = this.subscriptions))) return;

Don't you agree?

Thanks