Skip to content

Instantly share code, notes, and snippets.

@wookiehangover
Created October 14, 2013 21:49
Show Gist options
  • Save wookiehangover/6982780 to your computer and use it in GitHub Desktop.
Save wookiehangover/6982780 to your computer and use it in GitHub Desktop.
var Filter = Backbone.Model.extend({
initialize: function(options){
if( options.globalFilter ){
this.globalFilter = options.globalFilter;
this.set( this.globalFilter.toJSON() );
this.listenTo( this.globalFilter, 'change', function(){
this.set( this.globalFilter.toJSON() );
}, this );
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment