Skip to content

Commit

Permalink
Merge pull request #23108 from jrafanie/fix_rails_7_deprecation_direc…
Browse files Browse the repository at this point in the history
…t_descendants

Move to AS::DescendantsTracker.subclasses
  • Loading branch information
kbrock authored Jul 29, 2024
2 parents 2d788d1 + eee53ee commit 650ac72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion spec/models/mixins/supports_feature_mixin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def define_subclass(module_name, parent, supports_values = {})
# this cleans out those values so future runs do not have bogus classes
# this causes sporadic test failures.
def cleanup_subclass(parent, children)
tracker = ActiveSupport::DescendantsTracker.class_variable_get(:@@direct_descendants)[parent]
tracker = ActiveSupport::DescendantsTracker.subclasses(parent)
tracker&.reject! { |child| children.include?(child) }
end

Expand Down

0 comments on commit 650ac72

Please sign in to comment.