雖然師範學校collection
輸入可以採用這種結構Rails 4.1枚舉和簡單的形式:如何翻譯它們?
simple_form:
options:
profile:
sex:
male: Männlich
female: Weiblich
很容易地轉換
f.input :sex, collection: [:male, :female]
它似乎並沒有能夠給新的Rails 4.1翻譯枚舉功能。
我試着翻譯
f.input :sex, collection: f.object.class.sexes
這樣的:
simple_form:
options:
profile:
sex:
'0': Männlich
'1': Weiblich
但是,這是行不通的。這是簡單形式的缺失功能嗎?
我增加了一個問題:https://github.com/plataformatec/simple_form/issues/1063 –