airblade/paper_trail — pull request #212 by SeanMarcia (2013-03-21 21:05:22+00:00)
Title: Clean Paper Trail Versions

Hey guys the current system of deleting old versions wasn't very useful for our purposes on a CMS. Our university users use versions to maintain and switch between different sites depending on the time of year. For example during the spring, they reverted to the convocation page (and possibly make minor changes), after convocation they put their page up for welcoming new students in the fall and so forth. So just deleting versions older than a certain date isn't practical.
What this PR enables is it cleans up any excess versions and just leave the last one that happened on any given single day. The theory being that when someone makes changes, they will make a lot in the tweaking process but they are only concerned with the last one.
To run the command:
PaperTrail.clean_paper_trail_versions