Closed benk-gc closed 6 months ago
@mcmire Any chance you could approve the test workflow and give this one a look? This would unblock us using the gem in Rails 7.1. Thanks!
@mcmire Specs looks happy - what do you think about a merge + release for this one? Happy to make any changes.
@mcmire Ping on the above when you have a sec - thanks!
I've released this under 0.12.0: https://github.com/mcmire/super_diff/releases/tag/v0.12.0. Thanks again!
Previously the diffing code made an assumption that "id" would always be the primary field. This is not always the case, and the use of
read_attribute(:id)
is deprecated in rails/rails@39997a0.This changes adds support for use of custom primary key fields, and updates the Person test model to use the "person_id" primary key.
Note that this will almost certainly still run into issues if the model uses the newly introduced composite primary key type, so this would require additional changes outside the scope of this fix.