-
Notifications
You must be signed in to change notification settings - Fork 39
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
Fix for PT issue #594 #5
Conversation
@Iorint now that the PT core fix got merged. Could you please revisit this PR and update as required. Thanks |
Certainly. Will have some spare cycles later today to encapsulate the approach we've taken for has_many and has_many_through. Later in the week can do the belongs_to, and then finalise the other two next week. Stay tuned :) |
paper-trail-gem/paper_trail#1108 didn't work out. Instead, we'll add an optional column The addition of this column will be mentioned under the "Fixed" section of the PT 10.0.0 changelog, and (for lack of a better place) users will be directed to this PR for further information about PT-AT's adoption of this new column. @lorint, Sean, and I believe that PT-AT can adopt this column and fix paper-trail-gem/paper_trail#594 with changes like the following: # paper_trail_association_tracking/reifiers/has_one.rb
# def load_versions(assoc, model, transaction_id, version_at, base_class_name)
where("#{version_table_name}.item_type = ?", base_class_name).
+ where("#{version_table_name}.item_subtype = ?", assoc.class_name).
where("created_at >= ? OR transaction_id = ?", version_at, transaction_id). |
Hey @lorint just checking in. Any chance to revisit this PR and get it up to date? |
bdf0933
to
5326acb
Compare
a2eec6c
to
d6668e2
Compare
Closing due to inactivity. |
Transitioning away from using base_class in order to support versioned sub-classes that utilise STI. The other half of this fix is in PR #1108 in PaperTrail.