Skip to content

Instantly share code, notes, and snippets.

@chiefGui
Created May 29, 2015 15:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chiefGui/5e5856c7ccfb10bd6e22 to your computer and use it in GitHub Desktop.
Save chiefGui/5e5856c7ccfb10bd6e22 to your computer and use it in GitHub Desktop.
var Backboneiros = Backbone.Collection.extend({
rearrange: function (atIndex, toIndex) {
var modelMemory = this.models[atIndex];
this.remove(modelMemory, { silent: true });
this.add(modelMemory, { at: toIndex });
}
});
module.exports = Backboneiros;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment