我想为收藏项使用标签(例如,他们的翻译)。
= simple_form_for(@client) do |f|
= f.error_notification
.form-inputs
= f.input :name, label: t('client.name')
= f.input :level, collection: ['a', 'b', 'c'],
label_method: ????
label: t('client.level')
.form-actions
= f.button :submit, value: t('client.submit')
我想弄清楚,label_method
上面用什么。我想让 label_method 映射到翻译,如map {|s| t("client.#{s}")}
.