/public/js/app/collections/BaseCollection.js
JavaScript | 24 lines | 14 code | 6 blank | 4 comment | 0 complexity | 87304f999835f9ebf71dc8174ef0cb60 MD5 | raw file
- // BaseCollection.js
- // -------------
- define(["jquery", "backbone", "mixins/CommonMixin"],
- function($, Backbone, CommonMixin) {
- // Base Collection
- var Collection = Backbone.Collection.extend({
- initialize: function(options) {
- _.extend(this, options);
- },
- parse: function(response) {
- return response.data;
- }
- });
- _.extend(Collection.prototype, CommonMixin);
- // Returns the Model class
- return Collection;
- }
- );