mongoid-history icon indicating copy to clipboard operation
mongoid-history copied to clipboard

History tracker recording undo action as the last change..

Open nishabeysinghe opened this issue 4 years ago • 1 comments

When we perform the undo action, is there a way to use undo action twice in a row ? In my experince when u perform the undo action, the next undo action becomes a redo because the history tracker records the undo action as the last action we did,, Is there any way to implement history tracker as a stack ?

nishabeysinghe avatar Jan 21 '20 11:01 nishabeysinghe

This should be possible with some work. You can undo multiple changes with x.undo! :last => 3 today, but not by calling undo 3 times. I can see something like x.undo! :history => false or x.fundo! ;) PRs welcome!

dblock avatar Jan 21 '20 13:01 dblock