diff options
author | Vishnu Atrai <me@vishnuatrai.com> | 2012-02-26 18:11:49 +0530 |
---|---|---|
committer | Vishnu Atrai <me@vishnuatrai.com> | 2012-02-26 18:11:49 +0530 |
commit | a37c4742ee931f834844dde8a38798e1ec74d465 (patch) | |
tree | d7f648763f6e550e7f3d769e7f83492181733b62 | |
parent | 74bc920e84b985724a93c10a3ff21090ed1b9f8e (diff) | |
download | rails-a37c4742ee931f834844dde8a38798e1ec74d465.tar.gz rails-a37c4742ee931f834844dde8a38798e1ec74d465.tar.bz2 rails-a37c4742ee931f834844dde8a38798e1ec74d465.zip |
content_tag used instead string for option
-rw-r--r-- | actionpack/lib/action_view/helpers/form_tag_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb index 2cf1c9055c..9c86120865 100644 --- a/actionpack/lib/action_view/helpers/form_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb @@ -114,11 +114,11 @@ module ActionView html_name = (options[:multiple] == true && !name.to_s.ends_with?("[]")) ? "#{name}[]" : name if options.delete(:include_blank) - option_tags = "<option value=\"\"></option>".html_safe + option_tags + option_tags = content_tag(:option, '', :value => '').safe_concat(option_tags) end if prompt = options.delete(:prompt) - option_tags = "<option value=\"\">#{prompt}</option>".html_safe + option_tags + option_tags = content_tag(:option, prompt, :value => '').safe_concat(option_tags) end content_tag :select, option_tags, { "name" => html_name, "id" => sanitize_to_id(name) }.update(options.stringify_keys) |