Using the acts_as_list pluging and I've hit a wall. I'm using the lock_version column as the :version_column. If I revert the current version to a previous one, then edit it and save it, I don't get the next logical version number, I get the lock_version + 1. So the version numbers in the _versions table end up going 1,2,3 (revert to version 1), 2, not 1,2,3,4 If I use just the default version column everything works as expected. Great I thought I'll use the pair of them so a version column to track the version number and lock_version for optimistic locking, however, the plugin still detects locking_enabled? so these two don't work properly together and the version column never gets updated. So I can hack the plugin and simply remove the locking_enabled? check, that's easy and works. But there must be a neater way, I've seen a previous thread where there is talk about :extend or block syntax. How can this be used? Is it appropriate to use it to override the set_new_version method? Any help would be much appreciated. Thanks!
on 2009-05-28 01:14