-
Notifications
You must be signed in to change notification settings - Fork 29
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
Clear the model's association cache before resolving its association #435
base: main
Are you sure you want to change the base?
Conversation
@@ -152,6 +152,8 @@ def resolve_association_target(params) | |||
} | |||
end | |||
|
|||
# Clear the cache so that we get the latest associations. | |||
const.clear_reflections_cache |
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.
This approach would mean that we essentially never have reflections cached. Do we know how expensive that could be?
Would it be worth trying to only clear the cache based on file modifications, similar to how we handle reloading on schema changes?
gemfiles/Gemfile-rails-main
Outdated
@@ -7,7 +7,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |||
gemspec path: ".." | |||
|
|||
gem "puma" | |||
gem "sqlite3", "< 2" | |||
gem "sqlite3" |
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.
Do we still need the constraint in the main Gemfile
?
Fixes #420
This PR also fixes the CI failure with Rails main Gemfile.