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

fix: do not store ignored and skipped attributes in object_changes on destroy #1177

Conversation

michaelkhabarov
Copy link

I think skipped and ignored attributes should be ignored in object_changes on destroy (same way as on create and update). This PR fixes that.

  • 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.

else
@record.changed
end
changes_in_latest_version.keys
Copy link
Member

Choose a reason for hiding this comment

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

This avoids duplicating the conditional? Nice!


private

# Rails' implementation returns nothing on destroy :/
Copy link
Member

Choose a reason for hiding this comment

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

Nice use of polymorphism!

When overriding methods in the future, please add a # @override comment, like this:

      # Rails' implementation returns nothing on destroy :/
      #
      # @override

@jaredbeck jaredbeck merged commit 10396cc into paper-trail-gem:master Jan 2, 2019
jaredbeck added a commit that referenced this pull request Jan 3, 2019
aried3r pushed a commit to aried3r/paper_trail that referenced this pull request Dec 14, 2020
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