multilang-hstore icon indicating copy to clipboard operation
multilang-hstore copied to clipboard

Is there a way to search translated attributes in any language?

Open pilap82 opened this issue 11 years ago • 1 comments

Hi,

let's say I have a translated name column.

Post.where(name: 'youpi')

doesn't work.

Is there a way to look for any post whose name is 'youpi' in any of the locales (without having to duplicate the conditions for each locale)?

thanks, P.

pilap82 avatar Jul 30 '13 12:07 pilap82

Yes. you can use the avals(hstore) for that

see more at : http://www.postgresql.org/docs/9.0/static/hstore.html

seuros avatar Oct 22 '13 16:10 seuros