Globalize Plugin: SImple question about searching untraslated records

Hi,

how can i find all record of untranslated field on a field under
Globalize plugin ?

Example:

define a model:

class Translation < ActiveRecord::Base
translates :description
end

working with 2 locales (en-US base and it-IT)

when i create a record for english base locale and after set italian
locale reading the translation of model.description I retrieve the
default value (that’s ok because Globalize uses coalesce to return the
engish description if italian description is not present).

What can I do to know which translations is not already loadedin italian
locale ? (sort of Model.find(:all, :conditions => "description is null
or description = ‘’))

Thanks in advance.

I’ve solved from myself.

Simply using this condition only when not in base language:

Translation.find(:all, :conditions => “t_description.text is null”)

Hope this helps…

translates :description
locale ? (sort of Model.find(:all, :conditions => "description is null
or description = ‘’))

Thanks in advance.


Gianluca T.
TreNetMediaMaster S.r.l.
The Internet Technology Company
Telefono +39(049)776196
Fax +39(049)8087806
Visit us @: http://www.trenet.it - http://www.mediamaster.it
e-mail me @: [email protected]

Le informazioni trasmesse sono destinate esclusivamente alla persona o
alla società in indirizzo e sono da intendersi confidenziali e riservate.
Ogni trasmissione, inoltro, diffusione o altro uso di queste
informazioni a persone o società differenti dal destinatario é proibita.
Se ricevete questa comunicazione per errore, contattate il mittente e
cancellate le informazioni da ogni computer.