diff options
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_view/helpers/java_script_macros_helper.rb | 3 | ||||
-rw-r--r-- | actionpack/test/template/java_script_macros_helper_test.rb | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/actionpack/lib/action_view/helpers/java_script_macros_helper.rb b/actionpack/lib/action_view/helpers/java_script_macros_helper.rb index c2fd5d4370..c256f2d88b 100644 --- a/actionpack/lib/action_view/helpers/java_script_macros_helper.rb +++ b/actionpack/lib/action_view/helpers/java_script_macros_helper.rb @@ -186,7 +186,7 @@ module ActionView 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 @@ module ActionView padding:0; } EOT - ) end end diff --git a/actionpack/test/template/java_script_macros_helper_test.rb b/actionpack/test/template/java_script_macros_helper_test.rb index da168f9ee5..9d3c3f8052 100644 --- a/actionpack/test/template/java_script_macros_helper_test.rb +++ b/actionpack/test/template/java_script_macros_helper_test.rb @@ -53,7 +53,7 @@ class JavaScriptMacrosHelperTest < Test::Unit::TestCase 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) |