multilang-hstore
multilang-hstore copied to clipboard
Is there a way to search translated attributes in any language?
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.
Yes. you can use the avals(hstore) for that
see more at : http://www.postgresql.org/docs/9.0/static/hstore.html