FineLinePrototyping/angularjs-rails-resource — pull request #75 by tpodom (2013-10-06 15:22:03+00:00)
Title: Added new snapshot/rollback functions to allow undoing changes

Fixes #36.

Added new snapshot & rollback functions to allow undoing multiple levels of changes. This is currently using angular.copy which performs a deep copy on snapshot and on rollback reverts everything back to the original state (deletes attributes not in the original version).

I still need to document the functionality but there are a couple of things I want to think about with this design first.

1. Should we instead of using angular.copy use the serializers to go to/from json and allow resources to have special a special snapshotSerializer?
2. For nested resources should we trigger snapshot/rollback calls on those resources instead of performing deep copy/restore with angular.copy?
3. Should the rollback take the number of versions or the version # to roll back to?