2012-02-04 69 views

回答

7

Here的含有它處理翻譯(human_attribute_name)方法的文件,我想看到這你可以做你的lang.yml例如:代替

attributes: 
    username: "Nickname" 

attributes: 
    user: 
    username: "Nickname" 

它應該適用於所有型號的工作!

+3

謝謝!由於某種原因,要去的路徑是'attributes.attr_name' no'activerecord':o – antpaw 2012-02-04 12:45:38

+0

因爲現在可以使用沒有數據庫的模型(所以沒有activerecord),這就是所謂的activemodel。 – Cydonia7 2012-02-04 12:54:54