/* global define */

define([
  'jquery',
  'backbone',
  'models/post-model',
  'models/settings-model'
], function ($, Backbone, Post, Settings) {
  'use strict';
  var Posts = Backbone.Collection.extend({
    model: Post,
    url: Settings.get('api_url') + '/posts'
  });

  return Posts;
});

/* global define */

define([
  'jquery',
  'backbone',
  'models/post-model',
  'models/settings-model'
], function ($, Backbone, Post, Settings) {
  'use strict';

  var Posts = Backbone.Collection.extend({
    model: Post,
    url: function () {
      return Settings.get('api_url') + '/posts?' + this.filter.serialize();
    },

    initialize: function (filter) {
      this.filter = filter;
    },
  });

  return Posts;
});

Change post collection to allow using the PostFilter
Change post collection to allow using the PostFilter