提交 f833a780 编写于 作者: J Jeremy Kemper

text_field_with_auto_complete stylesheet uses <style type="text/css"> instead...

text_field_with_auto_complete stylesheet uses <style type="text/css"> instead of bare <style>. Closes #5610.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4558 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 3398f74d
......@@ -186,7 +186,7 @@ def text_field_with_auto_complete(object, method, tag_options = {}, completion_o
private
def auto_complete_stylesheet
content_tag("style", <<-EOT
content_tag('style', <<-EOT, :type => 'text/css')
div.auto_complete {
width: 350px;
background: #fff;
......@@ -211,7 +211,6 @@ def auto_complete_stylesheet
padding:0;
}
EOT
)
end
end
......
......@@ -53,7 +53,7 @@ def test_auto_complete_result
end
def test_text_field_with_auto_complete
assert_match "<style>",
assert_match %(<style type="text/css">),
text_field_with_auto_complete(:message, :recipient)
assert_dom_equal %(<input id=\"message_recipient\" name=\"message[recipient]\" size=\"30\" type=\"text\" /><div class=\"auto_complete\" id=\"message_recipient_auto_complete\"></div><script type=\"text/javascript\">\n//<![CDATA[\nvar message_recipient_auto_completer = new Ajax.Autocompleter('message_recipient', 'message_recipient_auto_complete', 'http://www.example.com/auto_complete_for_message_recipient', {})\n//]]>\n</script>),
text_field_with_auto_complete(:message, :recipient, {}, :skip_style => true)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册