-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for Rails 7.1 #125
Conversation
ActiveSupport::Deprecation.behavior = :raise | ||
if ActiveSupport.respond_to?(:deprecator) | ||
ActiveSupport.deprecator.behavior = :raise | ||
ActiveRecord.deprecator.behavior = :raise |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is right, but would appreciate another pair of eyes to check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not super familiar with the changes to deprecations, but this looks good to me. It looks like ActiveRecord.deprecator
is a dedicated instance of ActiveSupport::Deprecation
.
Require ransack >= 4.1 for Rails 7.1 support. Two major changes in Rails 7.1 are: - [NullRelation was removed][null_relation], but it seems the behaviour changed in Rails 7.0 such that the special handling was no longer required anyway - [ActiveSupport::Deprecation singleton was deprecated][deprecation] [null_relation]: rails/rails#47800 [deprecation]: rails/rails#47354
902a74f
to
3535fdb
Compare
baby_squeel.gemspec
Outdated
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec| | |||
|
|||
spec.files = Dir.glob('{lib/**/*,*.{md,txt,gemspec}}') | |||
|
|||
spec.add_dependency 'activerecord', '>= 6.1', '< 7.1' | |||
spec.add_dependency 'activerecord', '>= 6.1', '< 7.2' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @owst, I hope you don't mind, but I set this back to 6.1. Was there a reason you bumped the minimum version to 6.1.6?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rzane no worries, please modify as you see fit - it was because I thought I read that ransack >= 4.11
(required for Rails 7.1 support) had a lower-bound of 6.1.6
for activerecord
, but it seems that it actually requires >= 6.1.5
, so I guess baby_squeel
should match that lower bound?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @rzane any chance you could take another look at this? What do you think of matching Ransack's activerecord
lower bound?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense to me! Thank you for the explanation!
e8397d6
to
3535fdb
Compare
Sorry for the delay and thanks for contributing @owst. Also, thank you @rocket-turtle. I just released v3.0.0. |
Require ransack >= 4.1 for Rails 7.1 support.
Two major changes in Rails 7.1 are: