From 1a935ad7c647534f83ec03388ea1157b39eb6dcb Mon Sep 17 00:00:00 2001 From: Rusty Geldmacher Date: Tue, 10 Jul 2012 15:03:37 -0400 Subject: Fixed bug creating invalid HTML in select options When a select tag is created for a field with errors, then the inserted options will errantly have a
wrapping them. --- actionpack/lib/action_view/helpers/form_options_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_view/helpers/form_options_helper.rb') diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb index eef426703d..72fbbd109a 100644 --- a/actionpack/lib/action_view/helpers/form_options_helper.rb +++ b/actionpack/lib/action_view/helpers/form_options_helper.rb @@ -353,7 +353,7 @@ module ActionView html_attributes[:disabled] = 'disabled' if disabled && option_value_selected?(value, disabled) html_attributes[:value] = value - content_tag(:option, text, html_attributes) + content_tag_string(:option, text, html_attributes) end.join("\n").html_safe end -- cgit v1.2.3