I have two types of fields in my database, e.g. “name” and “name_ru”.
First one is a user’s name in english and the second one is in russian.
I want to intercept calls like “c.name” and add “_ru” to it if current
language is russian (I have my own Locale class like n Globalize).
So I want such thing:
c.name = “Johny English” # will be stored in the “name” column
c.name = “Johny Russian” # will be stored in the “name_ru” column
What ActiveRecord class and method should I overwrite to implement such
P.S. I’ve googled but without any result. I’m reading Globalize’s source
code atm and I hope to get something from here.