
Untitled
By: a guest on Jan 28th, 2012 | syntax:
None | size: 0.77 KB | hits: 15 | expires: Never
## config
...
config.i18n.default_locale = :es
FastGettext.silence_errors
FastGettext.locale = 'es'
## module with constants for options in form
module CompanyFormOptions
BUSINESS_TYPE = [
[I18n.t('business_type.fabricante'), 1],
[I18n.t('business_type.comerciante'), 2],
[I18n.t('business_type.agente'), 3],
[I18n.t('business_type.distribuidor'), 4],
[I18n.t('business_type.ministerio'), 5],
[I18n.t('business_type.asociacion'), 6],
[I18n.t('business_type.otros'), 7]
]
...
end
## view
- CompanyFormOptions::BUSINESS_TYPE.each do |bt|
= check_box_tag "company[business_type][]", bt[1], @company.business_type.include?, bt[1].to_s)
= bt[0]
## error at rendering
translation missing: en, business_type, fabricante
...