Just symbolize the date order value when necessary
This commit is contained in:
parent
b54c110022
commit
91a07f587c
|
@ -11,10 +11,10 @@ module SimpleForm
|
||||||
position = case input_type
|
position = case input_type
|
||||||
when :date, :datetime
|
when :date, :datetime
|
||||||
date_order = input_options[:order] || I18n.t('date.order')
|
date_order = input_options[:order] || I18n.t('date.order')
|
||||||
date_order.first
|
date_order.first.to_sym
|
||||||
else
|
else
|
||||||
:hour
|
:hour
|
||||||
end.to_sym
|
end
|
||||||
|
|
||||||
position = ActionView::Helpers::DateTimeSelector::POSITION[position]
|
position = ActionView::Helpers::DateTimeSelector::POSITION[position]
|
||||||
"#{attribute_name}_#{position}i"
|
"#{attribute_name}_#{position}i"
|
||||||
|
|
Loading…
Reference in New Issue