I recently updated my project to Rails 6 and faced a testing error when passing a composite key as an array to nested_attribute.
I have added a test case for this error. Please refer to this test case if necessary.
PR Description
Since this commit, record detection in nested_attributes.rb has been conducted using the detect method instead of cpk_detect_record.
I could not find any mention of this change, and considering that cpk_detect_record still exists in nested_attributes.rb but is not used, I created this PR.
This PR reverts to the approach used prior to the introduction of this PR.
If we are intended to use CompositePrimaryKeys::CompositeKeys for creating id as demonstrated in the test case (i.e., if the above change was intentional), I will close this PR.
Also, a quick thanks to the maintainers for their ongoing work on the project 👍
Problem Description
I recently updated my project to Rails 6 and faced a testing error when passing a composite key as an array to nested_attribute.
I have added a test case for this error. Please refer to this test case if necessary.
PR Description
Since this commit, record detection in nested_attributes.rb has been conducted using the
detect
method instead ofcpk_detect_record
.I could not find any mention of this change, and considering that
cpk_detect_record
still exists innested_attributes.rb
but is not used, I created this PR.This PR reverts to the approach used prior to the introduction of this PR.
If we are intended to use
CompositePrimaryKeys::CompositeKeys
for creating id as demonstrated in the test case (i.e., if the above change was intentional), I will close this PR.Also, a quick thanks to the maintainers for their ongoing work on the project 👍