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 AssociationLoader Rails 7 Deprecation Warning #147

Merged
merged 1 commit into from
Dec 20, 2021

Conversation

keoghpe
Copy link
Contributor

@keoghpe keoghpe commented Nov 20, 2021

Currently running this example code with rails 7 yields the following warning:

DEPRECATION WARNING: `preload` is deprecated and will be removed in Rails 7.0. Call `Preloader.new(kwargs).call` instead.

Updating the preloader code to use kwargs and call silences the warning.

Currently running this example code with rails 7 yields the following warning:

```
DEPRECATION WARNING: `preload` is deprecated and will be removed in Rails 7.0. Call `Preloader.new(kwargs).call` instead.
```

Updating the preloader code to use kwargs and call silences the warning.
@swalkinshaw
Copy link
Contributor

I'm thinking this should wait until Rails 7.0.0 is actually released since Preloader.new(kwargs).call doesn't exist in any prior stable versions.

@swalkinshaw
Copy link
Contributor

Merging since Rails 7.0 was released 🎉

@swalkinshaw swalkinshaw merged commit 33bd992 into master Dec 20, 2021
@swalkinshaw swalkinshaw deleted the fix-rails-7-deprecation-warning branch December 20, 2021 19:54
@shopify-shipit shopify-shipit bot temporarily deployed to rubygems January 18, 2022 19:12 Inactive
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.

None yet

2 participants