Skip to content
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

Fix for deprecation warning in rails 7 #2

Merged
merged 3 commits into from
Aug 10, 2022

Conversation

bunnahabhain
Copy link
Contributor

Rails 7 gives the following deprecation warning:

DEPRECATION WARNING: ActiveRecord::Base.partial_writes= is deprecated and will be removed in Rails 7.1. Use partial_updates= and partial_inserts= instead. (called from class:SelfCleaningSession at /Users/david/RubymineProjects/limited_sessions/lib/limited_sessions/self_cleaning_session.rb:5)

The pull request clears the warning.

@zarqman
Copy link
Owner

zarqman commented Aug 8, 2022

Thanks so much for catching this and for the PR!

It seems like this change will break backwards compatibility with versions of Rails prior to v7. Unless you believe otherwise, perhaps a conditional could be added to maintain that compatibility?

@bunnahabhain
Copy link
Contributor Author

You are absolutely right! This is my first attempt at a contribution to an open source project, and I jumped the gun.

@bunnahabhain
Copy link
Contributor Author

I have added a conditional, and tested with both Rails versions 6.1.6.1 and 7.0.3. It appears to work properly with both versions. Hopefully, I have got it right this time.

@zarqman zarqman merged commit c41a8f3 into zarqman:master Aug 10, 2022
@zarqman
Copy link
Owner

zarqman commented Aug 10, 2022

Looks good! Honored that you'd make your first opensource contribution to this project. Thanks so much!

@bunnahabhain
Copy link
Contributor Author

bunnahabhain commented Aug 10, 2022

Fantastic. And thank you for this wonderfully useful Gem!

@bunnahabhain bunnahabhain deleted the rails7 branch August 10, 2022 19:28
@bunnahabhain bunnahabhain restored the rails7 branch August 15, 2022 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants