Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use updated_at timestamp for "create" versions #589

Merged

Conversation

ItaiLeibowitz
Copy link
Contributor

"Create" versions currently use the item's created_at field to set the version's timestamp.

This is wrong in the case where the item was created at some point in the past, then deleted, then is now being created again (e.g., through reification). The version gets the timestamp from the original creation.

Instead, this change uses the item's updated_at field which is the time of the re-creation. This is also consistent with what happens in "update" versions

"Create" versions currently use the item's created_at field to set the version's timestamp. 

This is wrong in the case where the item was created at some point in the past, then deleted, then is now being created again (e.g., through reification). The version gets the timestamp from the original creation.

Instead, this change uses the item's updated_at field which is the time of the re-creation. This is also consistent with what happens in "update" versions
@batter batter merged commit 245e835 into paper-trail-gem:master Aug 12, 2015
batter added a commit that referenced this pull request Aug 12, 2015
batter added a commit that referenced this pull request Aug 12, 2015
@batter batter added this to the 4.1.0 milestone Aug 12, 2015
@jaredbeck jaredbeck modified the milestones: 4.0.1, 4.1.0 Dec 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants