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

Version Path
flapjack-0.9.4 lib/flapjack/gateways/web/public/js/modules/entity.js
flapjack-0.9.3 lib/flapjack/gateways/web/public/js/modules/entity.js
flapjack-1.0.0rc3 lib/flapjack/gateways/web/public/js/modules/entity.js
flapjack-1.0.0rc2 lib/flapjack/gateways/web/public/js/modules/entity.js
flapjack-0.9.2 lib/flapjack/gateways/web/public/js/modules/entity.js
flapjack-0.9.1 lib/flapjack/gateways/web/public/js/modules/entity.js
flapjack-1.0.0rc1 lib/flapjack/gateways/web/public/js/modules/entity.js
flapjack-0.9.0 lib/flapjack/gateways/web/public/js/modules/entity.js
flapjack-0.8.12 lib/flapjack/gateways/web/public/js/modules/entity.js