mongoid-enum icon indicating copy to clipboard operation
mongoid-enum copied to clipboard

search translation in superclass if it's not in subclass.

Open jorgefernando1 opened this issue 8 years ago • 0 comments

When i have a inherited model and a enum in the superclass, I need to repeat the translation. E.g

class Employee
 enum :foo,  [:bar, :baz, :zaz]

class Manager < Employee

and in translation .yml file I need to have

enums:
  employee:
    foo:
      bar: BAR
      baz: BAZ
      zaz: ZAZ

  employees/manager:
    foo:
      bar: BAR
      baz: BAZ
      zaz: ZAZ

So if I don't have the employees/manager defined, its should search in the employee

jorgefernando1 avatar May 24 '16 22:05 jorgefernando1