I have a legacy database table that has columns name_en and name_es and was wondering what the best way to query in ActiveRecord for either translation based on the user's i18n preference would be.
The i18n implementations I see for Rails tend to be more about storing translations in a separate hash or table, but I don't want to change the structure of the database.
Currently in the old PHP app, I send an argument to the mysql query to replace the name_lang and return name_en
or name_es AS name
for displaying when I call the row's id.