Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- App.buildModelCollection = function(modelName) {
- var model = new App.Models[modelName]();
- var url = model.urlRoot;
- var collection = Backbone.Collection.extend({
- model: App.Models[modelName],
- url: url,
- retrieve: function() {
- this.fetch({
- data: {
- filter: App.Options.Filter
- },
- success: function(collection) {
- console.log(collection);
- }
- });
- }
- });
- return new collection();
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement