Skip to content
This repository has been archived by the owner on Apr 11, 2024. It is now read-only.

Fixes for initial and final versions #68

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

winston
Copy link

@winston winston commented May 3, 2011

Snapshot of model attributes in modifications (instead of hash) for initial versions

Currently, when initial_version is set to true, the initial version is created with an empty hash in modifications.

However, I propose storing a snapshot of the model attributes in modifications for easy review, as in cases where the versioned object is deleted, you will still have a history of how the object was like in its initial state.

Note that as the versioned object is deleted, revert_to method cannot be used to obtain the initial state of the versioned, so a better solution, IMO, is to store a snapshot.

Creates a version with user on destroying a versioned object, if updated_by was set

When the option :dependent => :tracking is used, and a versioned object is deleted, a version would be created to record the deletion of the object along with its last seen attributes (so that it can be reverted).

However, it does not capture information of who deleted that versioned object, even when :updated_by was set.

Commit d66a190 fixes this problem.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant