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

Addressing Rails Edge breaking change with insert_all #165

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

ron-shinall
Copy link
Contributor

@ron-shinall ron-shinall commented Mar 9, 2024

This PR addresses a breaking change with Rails Edge insert_all. Prior to the change, insert_all used the connection of the model argument (model.connection). Now the connection has to be passed in as a separate argument.

I have tested this with Appraisal using rails-7, rails-7-1, and rails-main on Ruby 3.3.0.

Rails commit: rails/rails@1c0982d

Fixes #164

@ron-shinall
Copy link
Contributor Author

ron-shinall commented Mar 9, 2024

I've also updated rails_main.gemfile.lock to use the latest Rails main, as it was using a commit that was about 6 weeks old (rails/rails@cb035bd).

Also updated rails_main.gemfile.lock to latest rails main
@ron-shinall
Copy link
Contributor Author

@djmb thoughts on this?

@djmb
Copy link
Collaborator

djmb commented Mar 11, 2024

Thanks for the PR @ron-shinall.

This is needed because of the query cache workarounds (see #123) which involved using AR internals (and is exactly why we shouldn't have those workarounds!).

@djmb djmb merged commit 8bc68ce into rails:main Mar 11, 2024
34 checks passed
@ron-shinall ron-shinall deleted the insert-all-breaking-change branch March 11, 2024 17:56
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.

Rails Edge breaking change with insert_all
2 participants