Skip to content

Fix Rails 7#68

Merged
dmytro-savochkin merged 1 commit into
masterfrom
fix-rails-7
Nov 3, 2022
Merged

Fix Rails 7#68
dmytro-savochkin merged 1 commit into
masterfrom
fix-rails-7

Conversation

@dmytro-savochkin

Copy link
Copy Markdown
Collaborator

Fixes #67

Previously there was added some code in #40 to handle cases when models created by Temping are cached in ActiveRecord (ActiveSupport?) reflection store.
However in Rails 7 autoloading was hugely reworked, most of the code from ActiveSupport::Dependencies was deleted as described in https://rubyonrails.org/2021/9/3/autoloading-in-rails-7-get-ready, so this whole problem seems to be gone. At the very least I can't reproduce the exception from the test case added in #40 with ActiveRecord 7 (if I just remove ActiveSupport::Dependencies::Reference.clear!).

So, let's just try removing that line for Rails >= 7.

@dmytro-savochkin dmytro-savochkin self-assigned this Nov 3, 2022
@dmytro-savochkin dmytro-savochkin merged commit 32758ce into master Nov 3, 2022
@dmytro-savochkin dmytro-savochkin deleted the fix-rails-7 branch November 3, 2022 11:12
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.

Add support for ActiveRecord 7.0

1 participant