Class: TimePeriodInput
- Inherits:
-
SimpleForm::Inputs::Base
- Object
- SimpleForm::Inputs::Base
- TimePeriodInput
- Defined in:
- app/inputs/time_period_input.rb
Instance Method Summary collapse
Instance Method Details
#input ⇒ Object
2 3 4 5 6 7 8 9 10 |
# File 'app/inputs/time_period_input.rb', line 2 def input @builder.text_field("#{attribute_name}_number") + " ".html_safe + @builder.select("#{attribute_name}_unit", I18n.translate('time_period.days') => 'day', I18n.translate('time_period.weeks') => 'week', I18n.translate('time_period.months') => 'month', I18n.translate('time_period.years') => 'year' ) end |