diff options
author | Izumi Wong-Horiuchi <izumiwongh@gmail.com> | 2014-03-21 16:28:47 -0400 |
---|---|---|
committer | Izumi Wong-Horiuchi <izumiwongh@gmail.com> | 2014-03-24 20:00:20 -0400 |
commit | 60ed9d62826678006f0c8abde25ee779b1740c3a (patch) | |
tree | 61e4141d658d399eed92e853c9b312866f395322 /actionview/lib/action_view | |
parent | b9440c36dd881ca2643127ba372b2a40e2a4d37b (diff) | |
download | rails-60ed9d62826678006f0c8abde25ee779b1740c3a.tar.gz rails-60ed9d62826678006f0c8abde25ee779b1740c3a.tar.bz2 rails-60ed9d62826678006f0c8abde25ee779b1740c3a.zip |
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.
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/helpers/date_helper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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] |