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

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -