Codeminer42/cm42-central

View on GitHub
app/assets/javascripts/collections/activity_collection.js

Summary

Maintainability
A
0 mins
Test Coverage
import Activity from '../models/activity';

const ActivityCollection = Backbone.Collection.extend({
  model: Activity,

  comparator: function (activity) {
    return -new Date(activity.attributes.updated_at).getTime();
  },

  url: function () {
    return this.story.url() + '/activities';
  },
});

export default ActivityCollection;