0

Is there a way to get translatable attributes of a model extended with Mobility gem?

I've got a parent -> child objects conversion. Parent and child are different models even though they have almost the same structure, so I can't just dup it. I'm passing most of the attributes using Parent.attributes, still Mobility methods like name_en etc is not among those.

So, if I have an object extended with Mobility and having translates :name, translates :description. Is there a method to call on Parent class or instance to get an array like [:name, :description] or [:name_en, :name_de, :descroption_en, :description_de, ...] or even a key-value hash?

Marat
  • 622
  • 7
  • 21

0 Answers0