Rails 7: Use subclasses instead of direct_descendants on rails 7 and above#203
Merged
grosser merged 1 commit intogrosser:masterfrom Jul 29, 2024
Merged
Rails 7: Use subclasses instead of direct_descendants on rails 7 and above#203grosser merged 1 commit intogrosser:masterfrom
grosser merged 1 commit intogrosser:masterfrom
Conversation
Owner
|
best also add a rails 7.1 gemfile in case there is more trouble |
Owner
|
1.13.0 |
Contributor
Author
|
I'll look into adding that gemfile tomorrow 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rails 7 deprecated the use of direct_descendants in favor of subclasses it was then completely removed in Rails 7.1 which broke the ability of this gem to export model attributes for translation. This pull request fixes the issue by using the subclasses method on Rails version starting with 7.0. On versions below 7.0 we fall back to direct_descendants to maintain backward compatibility.
Closes #202