Comments (4)
>> Mymodel.serialized_attributes => {"value"=>Object, "interpolations"=>Array}
temporary solution
Mymodel.serialized_attributes = {}
from i18n-active_record.
any chance to get fix for it? thanks.
from i18n-active_record.
I'm on ruby 1.9.2p290
and rails 3.2.8
and my translations do not exhibit this kind of problem - but then again - my initializers/locale.rb does look like this:
require 'i18n/backend/active_record'
require 'i18n_cache_backend'
I18n.backend.class.send(:include, I18n::Backend::Fallbacks)
active_record_backend = I18n::Backend::ActiveRecord.new
active_record_backend.class.send(:include, I18n::Backend::Fallbacks)
I18n::Backend::ActiveRecord.send :include, I18n::Backend::Cache
# I18n.cache_store = Rails.application.config.i18n_cache_store
# .cache_store = ActiveSupport::Cache.lookup_store(:memory_store)
I18n.backend = I18n::Backend::Chain.new(active_record_backend, I18n.backend)
-
but by default I had
= f.input :interpolations
in my administrative translations management form, and that 'saved' me from persisting my translations with a message resembling this issue - and debugging on the create action further showed me that the error hinted at interpolations being serialized as string when expected to be an array.
Once I lost the interpolations field in my form, everything was perfect :)
from i18n-active_record.
Issue is quite old, so i am not sure if it is still relevant. So closing this for now.
from i18n-active_record.
Related Issues (20)
- undefined method `map' for "translation missing: en-US.i18n.plural.keys":String HOT 4
- lookup method not reusing @translations HOT 12
- Error encountered when creating a DB HOT 1
- Generator with class name in a module produces invalid migration HOT 1
- Falling docker build HOT 2
- Add a changelog HOT 4
- Documentation or Removal of proc handling mechanism HOT 1
- Add additional config options `fallback_to_default_locale` and `raise_exception_on_missing` HOT 3
- cache_translations = true not respected if translations table is empty HOT 2
- Memoization stopped working on upgrading to 1.0.0 HOT 7
- Breaks on latest i18n HOT 2
- Configuring ActiveRecord backend as first in chain causes errors during initialization HOT 3
- rails 7.0.3.1: Psych::DisallowedClass: Tried to load unspecified class: Symbol HOT 1
- Update example article for Rails 5.1 HOT 3
- Missing translations with default values as option HOT 1
- Code reloading with Zeitwerk HOT 4
- Issue with singular vs plural look up HOT 2
- Translations with interpolations break on rails 7.1+ HOT 3
- After upgrade to Rails 7.1, translations that end in a colon return a Hash, not a String HOT 25
- Does the cache get invalidated across the multi threads? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from i18n-active_record.