Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change using of class object for custom translation model #149

Merged
merged 2 commits into from
Dec 16, 2024

Conversation

matko9
Copy link
Contributor

@matko9 matko9 commented Dec 11, 2024

When using custom translation model in config, Translation was still used for to_h method.

This was a problem if we are using custom translation model with different serialization coder for example. This was one of solutions for changes so that current database is compatible with Rails 7.1 (#147 (comment)).

Changing the default coder in custom translation model works, but there is a problem only if using cache_translations in config which this change fixes.

lib/i18n/backend/active_record/translation.rb Outdated Show resolved Hide resolved
lib/i18n/backend/active_record/translation.rb Outdated Show resolved Hide resolved
Matko Abramovic and others added 2 commits December 16, 2024 14:17
When using custom translation model in config, Translation was still used for to_h method.
@timfjord timfjord force-pushed the translation-model-to-h-fix branch from c88cbad to ef51e27 Compare December 16, 2024 14:17
@timfjord timfjord merged commit 906bf9c into svenfuchs:master Dec 16, 2024
24 checks passed
@timfjord
Copy link
Collaborator

@matko9 Thanks for the contribution.

@timfjord
Copy link
Collaborator

Released as v1.4.0

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.

None yet

2 participants