grosser / gettext_i18n_rails

Rails: FastGettext, I18n integration -- simple, threadsafe and fast!
MIT License
268 stars 91 forks source link

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

Closed Hornwall closed 3 months ago

Hornwall commented 3 months ago

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 commented 3 months ago

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

grosser commented 3 months ago

1.13.0

Hornwall commented 3 months ago

I'll look into adding that gemfile tomorrow 👍