3 ms·
Implementing a passable undo with a database-backed system gets a lot easier if you have an append-only record of every transaction. Rails has a great gem that
by kcorbitt 13y ago
Implementing a passable undo with a database-backed system gets a lot easier if you have an append-only record of every transaction.
Rails has a great gem that adds this feature with a minimum of fuss (https://github.com/airblade/paper_trail https://github.com/airblade/paper_trail). There's even a Railscast that goes over how to use it to implement "undo" (http://railscasts.com/episodes/255-undo-with-paper-trail http://railscasts.com/episodes/255-undo-with-paper-trail).
- deleted 13y ago[deleted]