From 60ed9d62826678006f0c8abde25ee779b1740c3a Mon Sep 17 00:00:00 2001 From: Izumi Wong-Horiuchi Date: Fri, 21 Mar 2014 16:28:47 -0400 Subject: Fix date_select option overwriting html classes with_css_classes: true option overwrites other html classes. Concatenate day month and year classes rather than overwriting. --- actionview/lib/action_view/helpers/date_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionview/lib/action_view') diff --git a/actionview/lib/action_view/helpers/date_helper.rb b/actionview/lib/action_view/helpers/date_helper.rb index 1738df9cac..2efb9612ac 100644 --- a/actionview/lib/action_view/helpers/date_helper.rb +++ b/actionview/lib/action_view/helpers/date_helper.rb @@ -965,7 +965,7 @@ module ActionView :name => input_name_from_type(type) }.merge!(@html_options) select_options[:disabled] = 'disabled' if @options[:disabled] - select_options[:class] = type if @options[:with_css_classes] + select_options[:class] = [select_options[:class], type].compact.join(' ') if @options[:with_css_classes] select_html = "\n" select_html << content_tag(:option, '', :value => '') + "\n" if @options[:include_blank] -- cgit v1.2.3