Repository navigation
Name history - #340
Draft
vangberg wants to merge 12 commits into
Draft
Name history#340vangberg wants to merge 12 commits into
vangberg wants to merge 12 commits into
Conversation
This reverts commit 53e736a.
vangberg
added this pull request to stack #342
October 8, 2026 07:18
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[WIP]
Tracking versions
This PR adds a
Versionedconcern. When included in a model,Versionrecords are automatically created on create/update/delete, and aversionsassociation is added to the model.This is what an update to
Namewhich changesproposed_in_idlooks like:Tracking changes to etymology
A change to one etymology attribute should snapshot the current value of all etymology attributes ( +
namewhich is used byfull_etymology). This is done withversioned_together, which lets you specify which attributes should be tracked as a single attribute.Public history
When rendering the history, we need to:
This is all orchestrated by
Name::PublicHistory.UI
Todo
history_values)operationattribute.create/destroydump all attributes in the version? I think so.Value flow
Single attribute
Name#syllabication
↓ Version#changeset
↓ PublicHistory#changes_for(version)
Grouped etymology
Name#etymology_xx_description
↓ Version#changeset — includes unchanged companions
↓ PublicHistory#changes_for(version) — groups before/after snapshots