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

Query Versions Where Object Changed To Attributes #1291

Merged
merged 1 commit into from
Apr 5, 2021

Conversation

kevin-j-m
Copy link
Contributor

This extends to the public API to provide more targeted
querying of object changes. where_object_changes will look for either
side of the change of the attributes provided - either versions where
the attribute changed from the provided value, or changed to the
provided value.

The where_object_changes_to addition focuses only on one
side of that equation. If you want to find versions where the
attribute(s) explicitly changed to some known value, this will only
show those changes, as opposed to both from and to.

Thank you for your contribution!

Check the following boxes:

  • Wrote good commit messages.
  • Feature branch is up-to-date with master (if not - rebase it).
  • Squashed related commits together.
  • Added tests.
  • Added an entry to the Changelog if the new
    code introduces user-observable changes.
  • The PR relates to only one subject with a clear title
    and description in grammatically correct, complete sentences.

This extends to the public API to provide more targeted
querying of object changes. `where_object_changes` will look for either
side of the change of the attributes provided - either versions where
the attribute changed __from__ the provided value, or changed __to__ the
provided value.

The `where_object_changes_to` addition focuses only on one
side of that equation. If you want to find versions where the
attribute(s) explicitly changed *to* some known value, this will only
show those changes, as opposed to both *from* and *to*.
Copy link
Member

@jaredbeck jaredbeck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. I have an idea about simplifying the errors re: text columns, but I'll merge this first and make my suggestion as a PR.

@jaredbeck jaredbeck merged commit 06a7c12 into paper-trail-gem:master Apr 5, 2021
jaredbeck added a commit that referenced this pull request Apr 5, 2021
@jaredbeck
Copy link
Member

Released in 12.1.0

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.

2 participants