aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2012-04-05 09:39:17 -0700
committerXavier Noria <fxn@hashref.com>2012-04-05 09:39:17 -0700
commit64462039c01329e8d43f7ffb9076cecbc430a8e6 (patch)
tree3432192fb1b377e9714c90afaa3a92829198cdf7 /actionpack/lib/action_view
parent174cf8b22064c3999dfa685014d5b31ac993bb54 (diff)
parenta37c4742ee931f834844dde8a38798e1ec74d465 (diff)
downloadrails-64462039c01329e8d43f7ffb9076cecbc430a8e6.tar.gz
rails-64462039c01329e8d43f7ffb9076cecbc430a8e6.tar.bz2
rails-64462039c01329e8d43f7ffb9076cecbc430a8e6.zip
Merge pull request #5182 from castlerock/content_tag_instead_string
content_tag used instead string for option
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb4
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 e403d6cf5e..b5e0970612 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -122,11 +122,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)