When trying to use the populator gem to generate random data for a model having composite keys, this error is returned.
I tried searching for similar issues, and found one in #134 and #137, but the fix mentioned there does not exist anymore. I understand that this issue has been resolved in the latest version of the composite_primary_keys gem 7.0.10, but I cannot update my version to that as I'm using rails version 4.0.2 for my project.
The version I'm using is 6.0.6, and I'm trying to run the following code :
CompetitionCoupon.populate comp.no_of_winners do |comp_coupon|
comp_coupon.coupon_expiry_date = expiry_date
comp_coupon.coupon_id = coupons.sample.coupon_id
comp_coupon.id = [position, comp.id]
position+=1
end
And, I receive the following error :
NoMethodError: undefined method `to_sym' for ["position", "competition_id"]:CompositePrimaryKeys::CompositeKeys
Is there any resolution for this on version 6.0.6?
When trying to use the populator gem to generate random data for a model having composite keys, this error is returned. I tried searching for similar issues, and found one in #134 and #137, but the fix mentioned there does not exist anymore. I understand that this issue has been resolved in the latest version of the composite_primary_keys gem 7.0.10, but I cannot update my version to that as I'm using rails version 4.0.2 for my project. The version I'm using is 6.0.6, and I'm trying to run the following code :
And, I receive the following error : NoMethodError: undefined method `to_sym' for ["position", "competition_id"]:CompositePrimaryKeys::CompositeKeys
Is there any resolution for this on version 6.0.6?