Sha256: be4ba8dbae71015182b880f1f59a50229f245d56778159d07f638919e63cda36
Contents?: true
Size: 698 Bytes
Versions: 9
Compression:
Stored size: 698 Bytes
Contents
(function(flapjack, Entity) { // Dependencies var Contact = flapjack.module("contact"); // Shorthands // The application container var app = flapjack.app; Entity.Model = Backbone.JSONAPIModel.extend({ name: 'entities', defaults: { name: '', id: null, links: {}, }, toJSON: function() { // TODO ensure that attributes has nothing outside the above, except 'links' return _.pick(this.attributes, 'id', 'name'); } }); Entity.List = Backbone.JSONAPICollection.extend({ model: Entity.Model, comparator: 'name', url: function() { return flapjack.api_url + "/entities"; } }); })(flapjack, flapjack.module("entity"));
Version data entries
9 entries across 9 versions & 1 rubygems