Skip to content

Instantly share code, notes, and snippets.

@krusty
Created September 20, 2012 17:21
Show Gist options
  • Save krusty/3757179 to your computer and use it in GitHub Desktop.
Save krusty/3757179 to your computer and use it in GitHub Desktop.
Catalog.Model = Backbone.Model.extend({
url: function () {
return '/v1/catalogs/' + this.get('catalog_id');
},
parse: function (response) {return response.catalog},
isPhoneBook: function () {
return _.any(this.get('tags'), function (tag) {
return tag.name === "Phone Book";
});
},
isAssisted: function () {
return this.get('notification_method')['facilitated?'];
},
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment