Skip to content

Commit

Permalink
Making time_zone_options_for_select return a html_safe string
Browse files Browse the repository at this point in the history
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
  • Loading branch information
mikel authored and spastorino committed Aug 15, 2010
1 parent bdeeca3 commit 88fc37f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion actionpack/lib/action_view/helpers/form_options_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -493,7 +493,7 @@ def time_zone_options_for_select(selected = nil, priority_zones = nil, model = :
end

zone_options += options_for_select(convert_zones[zones], selected)
zone_options
zone_options.html_safe
end

private
Expand Down
4 changes: 4 additions & 0 deletions actionpack/test/template/form_options_helper_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,10 @@ def test_time_zone_options_with_unselected_priority_zones
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>"
Expand Down

0 comments on commit 88fc37f

Please sign in to comment.