Listening to Model.subscribed_events to update subscribed_models
Fixes issue described in
@@ -22,6 +22,7 @@ export class Model extends HasProps
@listenTo(@, evt, () -> cb.execute(@))
@listenTo(@, 'change:js_event_callbacks', () -> @_update_event_callbacks)
+ @listenTo(@, 'change:subscribed_events', () -> @_update_event_callbacks)
_process_event: (event) ->
if event.is_applicable_to(this)
@@ -47,6 +48,8 @@ export class Model extends HasProps
_doc_attached: () ->
if not isEmpty(@js_event_callbacks)
@_update_event_callbacks()
+ if not isEmpty(@subscribed_events)
+ @_update_event_callbacks()
select: (selector) ->
if selector.prototype instanceof Model
