How to write i18n String for Rails 4.1 Enums? -


for exmaple, edit config/locales/en.yml

en:   activerecord:     models:       user: user     attributes:       user:         name: name 

you can get

user.model_name.human # => user  user.human_attribute_name('name') # => name 

but how write rails 4.1 enums i18n values ?

try enum_help gem. description:

help activerecord::enum feature work fine i18n , simple_form.


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -