aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorMikel Lindsaar <raasdnil@gmail.com>2010-08-15 22:36:29 +1000
committerSantiago Pastorino <santiago@wyeworks.com>2010-08-15 09:58:40 -0300
commitfd9f3ad36b7ad116dfd902db5b23e3178411dc73 (patch)
tree3864526ed27ec261d41ecc0ae5122da25ec1a36a /actionpack
parent1607a8b08ce355043220f035b6d56a6e5a5d782c (diff)
downloadrails-fd9f3ad36b7ad116dfd902db5b23e3178411dc73.tar.gz
rails-fd9f3ad36b7ad116dfd902db5b23e3178411dc73.tar.bz2
rails-fd9f3ad36b7ad116dfd902db5b23e3178411dc73.zip
Making time_zone_options_for_select return a html_safe string
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_view/helpers/form_options_helper.rb2
-rw-r--r--actionpack/test/template/form_options_helper_test.rb4
2 files changed, 5 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb
index 698cd3e4cd..71ee970bee 100644
--- a/actionpack/lib/action_view/helpers/form_options_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -493,7 +493,7 @@ module ActionView
end
zone_options += options_for_select(convert_zones[zones], selected)
- zone_options
+ zone_options.html_safe
end
private
diff --git a/actionpack/test/template/form_options_helper_test.rb b/actionpack/test/template/form_options_helper_test.rb
index 3dfaffbe97..951ad41f84 100644
--- a/actionpack/test/template/form_options_helper_test.rb
+++ b/actionpack/test/template/form_options_helper_test.rb
@@ -289,6 +289,10 @@ class FormOptionsHelperTest < ActionView::TestCase
opts
end
+ def test_time_zone_options_returns_html_safe_string
+ assert time_zone_options_for_select.html_safe?
+ end
+
def test_select
@post = Post.new
@post.category = "<mus>"