Changeset values different when called from `item`.

Author: joshuapinterCreated Feb 24, 2025Updated Aug 26, 2026

Check the following boxes:

  • This is not a usage question, this is a bug report
  • This bug can be reproduced with the script I provide below
  • This bug can be reproduced in the latest release of the paper_trail gem

I'm happy to look into this and fix it, along with other PRs I have created but want to get your initial opinion to help put me on the right track.

I am seeing two different results when calling changeset for the same version record. Here is a simplified version:

ruby
version.id
#=> 66759735

version.changeset
#=> 
{ "file_file_name" =>
  ["CNTRAL - Black Swan Energy Report - Black Swan Energy - 2021-01-14 07-14-53.pdf",
   "CNTRAL - Black Swan Energy Report - Black Swan Energy - 2021-01-14 07-14-53.pdf"]}

version.item.versions.last.id
#=> 66759735

version.item.versions.last.changeset
# => 
{ "file_file_name" =>
  ["CNTRAL - Black Swan Energy   Report - Black Swan Energy - 2021-01-14 07-14-53.pdf",
   "CNTRAL - Black Swan Energy Report - Black Swan Energy - 2021-01-14 07-14-53.pdf"]}

Again, happy to fix this if you can point me in the right direction.

Thanks!

Source: paper-trail-gem/paper_trail