Just symbolize the date order value when necessary

This commit is contained in:
Carlos Antonio da Silva 2013-07-18 11:48:51 -03:00
parent b54c110022
commit 91a07f587c
1 changed files with 2 additions and 2 deletions

View File

@ -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"