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

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

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