Skip to content

Support cache_classes: true descendants filtering#54

Merged
nertzy merged 1 commit intomasterfrom
descendants-tracking-active-record-cache_classes
Jan 30, 2025
Merged

Support cache_classes: true descendants filtering#54
nertzy merged 1 commit intomasterfrom
descendants-tracking-active-record-cache_classes

Conversation

@nertzy
Copy link
Collaborator

@nertzy nertzy commented Jan 30, 2025

When cache_classes is true, we can no longer rely on the Active Support dependencies tracker, so we use our own separate tracker to filter out destroyed with_model models from Class#descendants and Class#subclasses.

Fixes #35

@nertzy nertzy force-pushed the descendants-tracking-active-record-cache_classes branch 2 times, most recently from 0260baf to 3b24d3e Compare January 30, 2025 16:49
@nertzy nertzy changed the title Support cache_classes: false descendants filtering Support cache_classes: true descendants filtering Jan 30, 2025
@nertzy nertzy force-pushed the descendants-tracking-active-record-cache_classes branch from 3b24d3e to cf1523f Compare January 30, 2025 17:06
When cache_classes is true, we can no longer rely on the Active Support
dependencies tracker, so we use our own separate tracker to filter out
destroyed with_model models from Class#descendants and Class#subclasses.

Fixes #35
@nertzy nertzy force-pushed the descendants-tracking-active-record-cache_classes branch from cf1523f to 386503f Compare January 30, 2025 17:08
@nertzy nertzy merged commit 386503f into master Jan 30, 2025
20 checks passed
@nertzy nertzy deleted the descendants-tracking-active-record-cache_classes branch June 1, 2025 22:31
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.

Descendants tracking error when cache_classes = true

1 participant