ruby on rails - Best practice for sharing translation of Active Record attributes -


i have following yaml in 1 of translation files:

se:   activerecord:     attributes:       user:         name: "namn"         town: "stad"       admin:         name: "namn"         level: "nivå"       pet:         name: "namn"       company:         name: "namn"       food:         name: "namn" 

is there way me dry , share translation of name across models? bonus points if can remove entries pet, company , food completely.

se:   common: &common     name: "namn"   activerecord:     attributes:       user:         <<: *common         town: "stad"       admin:         <<: *common         level: "nivå"       pet:         <<: *common       company:         <<: *common       food:         <<: *common 

Comments

Popular posts from this blog

Magento/PHP - Get phones on all members in a customer group -

php - .htaccess mod_rewrite for dynamic url which has domain names -

Website Login Issue developed in magento -