Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Possible AR 3.1.0beta bug

#6123

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?

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

State: stale
Milestone: none
Assigned to: nobody
Importance: Low

Activity

  1. bug.odesk (at gmail)
    bug.odesk (at gmail)

    I created test app: https://github.com/slbug/test_i18n

    just clone it, run migrations and check localhost:3000

    P.S. even without initializer (only with i18n-active_record gem in Gemfile) it shows same serialized attributes.

    December 7th, 2010 @ 09:10 AM

  2. bug.odesk (at gmail)
    bug.odesk (at gmail)
    • Tag changed from activerecord, rails3.1 to activerecord, i18n, rails3, rails3.1, serialized

    December 7th, 2010 @ 03:50 PM

  3. José Valim
    José Valim
    • Importance changed from to Low

    Seems like AR bug. Try running i18n-activerecord using 3.1.0 tests.

    December 7th, 2010 @ 05:07 PM

  4. bug.odesk (at gmail)
    bug.odesk (at gmail)

    seems like i can't start tests. it fails on 1.9.2 because on rubytree gem and fails on 1.8.7 because of some error in rubyinline. will continue trying, but...

    December 7th, 2010 @ 05:54 PM

  5. bug.odesk (at gmail)
    bug.odesk (at gmail)

    finally managed to run i18n-activerecord tests. all passes using 3.0.3 and 3.1.0

    December 7th, 2010 @ 10:48 PM

  6. bug.odesk (at gmail)
    bug.odesk (at gmail)

    anything else i can do to help find problem?

    December 8th, 2010 @ 02:43 PM

  7. rails
    rails
    • Tag changed from activerecord, i18n, rails3, rails3.1, serialized to activerecord, i18n, rails3, rails31, serialized
    • State changed from new to open

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

    March 9th, 2011 @ 12:00 AM

  8. rails
    rails
    • State changed from open to stale

    March 9th, 2011 @ 12:00 AM