Closed rcugut closed 1 year ago
PS: I see the CI Github Actions setup is "hardcoded" to use ruby 2.6
Thank you @rcugut This already works in production, but I also had to change few things to make make it work in Rails 7. Hope this will be merged soon
Thank you @rcugut This already works in production, but I also had to change few things to make make it work in Rails 7. Hope this will be merged soon
Thank you @olegantonyan
I just updated to Rail 7 too, and I had to only change the gemspec to for activerecord 7, and it works.
I'll watch for an update and use the published gem when you push it. Thank you
If only I was a contributor here, he-he :) For Rails 7 I've changed this https://github.com/olegantonyan/polymorphic_integer_type/commit/c01f473d3010dcd512e043791268765f7a305a37 b/c otherwise it broke non-integer polymorphic association. Also, it doesn't work with STI (when has_many points to model using STI). It's not crucial for me, but maybe someone is already working on proper fix for this
This adds code compatibility with ruby 3.x changes in regard the delegation of positional splat arguments.
More info in the official ruby blog post explaining this change: https://www.ruby-lang.org/en/news/2019/12/12/separation-of-positional-and-keyword-arguments-in-ruby-3-0/
The existing code breaks for ruby 3.x:
I tested (locally) and the code changes are backward compatible for ruby 2.6 and 2.7.