There is a gem which does exactly this: https://github.com/olegantonyan/translateable
Oleg Antonyan
501

Thank you for your link.

The main thing this library is doing is to add virtual attributes in your models, so you can write product.name = "My product" instead of product.name["en"] = "My product" . This is clearly optional. My personal preference is not to use virtual attributes at all, so you don’t add stuff in your models…

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.