Sha256: 7972715d69a3d72875eff5c103b0b0adacb8fc93c2027f57af8ca45779e4245d
Contents?: true
Size: 698 Bytes
Versions: 27
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
27 entries across 27 versions & 1 rubygems