It seems there have been some changes to ActiveRecord between Rails 1.1.0 RC and 1.10 Final that cause Globalize to fail; 1.10 RC was working fine. When retrieving records from the DB only the base language version is fetched, even when the locale has been set differently. The SQL in the log confirms that Globalize is ignored and a regular find() is performed. Globalize::Locale.set(''nl'') # switch to ''nl''; base language is ''en'' article = Content::Article.find(article.id) assert_equal ''Nieuwe Titel voor Artikel'', article.content.title SELECT * FROM content_items WHERE (content_items.id = 146) AND ( (content_items.`object_type` = ''Article'' ) ) LIMIT 1 SELECT * FROM content_articles WHERE (content_articles.id = 146) LIMIT 1 Anyone else experienced this issue?
jmharvey.9956003@bloglines.com
2006-Mar-30 14:22 UTC
[Rails] Globalize DB translate not working in Rails 1.1.0
Yep, Globalize isn''t 1.1 compatible yet, we''re working on it. Please join the Globalize mailing list to keep up to date: http://globalize-rails.org/wiki/pages/MailingList Josh http://shnoo.gr --- rails@lists.rubyonrails.org wrote: It seems there have been some changes to ActiveRecord between Rails> 1.1.0 RC and1.10 Final that cause Globalize to fail; 1.10 RC was> working fine. Whenretrieving records from the DB only the base language> version is fetched,even when the locale has been set differently. The> SQL in the log confirmsthat Globalize is ignored and a regular find()> is performed. > > Globalize::Locale.set(''nl'')# switch to ''nl''; base language is ''en''> article = Content::Article.find(article.id)> assert_equal ''Nieuwe Titel voor Artikel'', article.content.title > > SELECT * FROM content_items WHERE (content_items.id = 146) AND ( >(content_items.`object_type` = ''Article'' ) ) LIMIT 1> > SELECT * FROMcontent_articles WHERE (content_articles.id = 146) LIMIT 1> > Anyone elseexperienced this issue?> > > _______________________________________________> Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails>
Maybe Matching Threads
- Trouble installing SWAT on a Samba 4 Alpha 13 build on Ubuntu Server
- Trouble installing SWAT on a Samba 4 Alpha 13 buildonUbuntu Server
- break in a each function
- Trouble installing SWAT on a Samba 4 Alpha 13 build onUbuntu Server
- ActiveRecord::Observer problem