Skip to content

Rails 7: Use subclasses instead of direct_descendants on rails 7 and above#203

Merged
grosser merged 1 commit intogrosser:masterfrom
Teamtailor:fix/rails7
Jul 29, 2024
Merged

Rails 7: Use subclasses instead of direct_descendants on rails 7 and above#203
grosser merged 1 commit intogrosser:masterfrom
Teamtailor:fix/rails7

Conversation

@Hornwall
Copy link
Copy Markdown
Contributor

@Hornwall Hornwall commented Jul 29, 2024

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

@grosser grosser merged commit 07898ea into grosser:master Jul 29, 2024
@grosser
Copy link
Copy Markdown
Owner

grosser commented Jul 29, 2024

best also add a rails 7.1 gemfile in case there is more trouble

@grosser
Copy link
Copy Markdown
Owner

grosser commented Jul 29, 2024

1.13.0

@Hornwall
Copy link
Copy Markdown
Contributor Author

I'll look into adding that gemfile tomorrow 👍

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.

rake gettext:store_model_attributes breaks with ActiveSupport 7 and Ruby 3.1.4

2 participants