From d3a64c04ec31f06c25bf3c33a5bc65f91381c271 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 3 Apr 2005 16:23:56 +0000 Subject: [PATCH] Fixed javascript_include_tag to output type instead of language and conform to XHTML #1018 [Rick Olson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 2 ++ actionpack/lib/action_view/helpers/asset_tag_helper.rb | 8 ++++---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 36eed041619ce..2ee52cf9ca123 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Fixed javascript_include_tag to output type instead of language and conform to XHTML #1018 [Rick Olson] + * Added NumberHelper for common string representations like phone number, currency, and percentage #1015 [DeLynn] * Added pagination for scaffolding (10 items per page) #964 [mortonda@dgrmm.net] diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index f6159e52465aa..55036a3ff4281 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -26,15 +26,15 @@ def auto_discovery_link_tag(type = :rss, options = {}) # Returns a script include tag per source given as argument. Examples: # # javascript_include_tag "xmlhr" # => - # + # # # javascript_include_tag "common.javascript", "/elsewhere/cools" # => - # - # + # + # def javascript_include_tag(*sources) sources.collect { |source| source = compute_public_path(source, 'javascripts', 'js') - content_tag("script", "", "language" => "JavaScript", "type" => "text/javascript", "src" => source) + content_tag("script", "", "type" => "text/javascript", "src" => source) }.join("\n") end