This project is archived and is in readonly mode.

#6123 ✓stale
bug.odesk (at gmail)

Possible AR 3.1.0beta bug

Reported by bug.odesk (at gmail) | December 7th, 2010 @ 08:52 AM

Not completely sure if it rails bug or not, but still let me explain. I'm trying to use I18n::Backend::ActiveRecord with rails 3.1.0beta. My initializer:

I18n.backend = I18n::Backend::ActiveRecord.new

I18n::Backend::ActiveRecord.send(:include, I18n::Backend::Memoize)
I18n::Backend::Simple.send(:include, I18n::Backend::Memoize)
I18n::Backend::Simple.send(:include, I18n::Backend::Pluralization)
I18n::Backend::ActiveRecord.send(:include, I18n::Backend::Flatten)

I18n.backend = I18n::Backend::Chain.new(I18n::Backend::Simple.new, I18n.backend)

Everything works perfect, except one thing. AR backend using serialized attributes (value and interpolations) in I18n::Backend::ActiveRecord::Translation model. And weird thing - every models have serialized_attributes = {"value"=>Object, "interpolations"=>Array}. I can't figure out why it's set for every model. This breaks normal saving for those attributes in my models. On AR 3.0.3 everything ok.

Can you please check it?

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Pages