Skip to content

Commit

Permalink
Fixed javascript_include_tag to output type instead of language and c…
Browse files Browse the repository at this point in the history
…onform to XHTML #1018 [Rick Olson]

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information
dhh committed Apr 3, 2005
1 parent efb55d1 commit d3a64c0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 2 additions & 0 deletions actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN* *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 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] * Added pagination for scaffolding (10 items per page) #964 [mortonda@dgrmm.net]
Expand Down
8 changes: 4 additions & 4 deletions actionpack/lib/action_view/helpers/asset_tag_helper.rb
Expand Up @@ -26,15 +26,15 @@ def auto_discovery_link_tag(type = :rss, options = {})
# Returns a script include tag per source given as argument. Examples: # Returns a script include tag per source given as argument. Examples:
# #
# javascript_include_tag "xmlhr" # => # javascript_include_tag "xmlhr" # =>
# <script language="JavaScript" type="text/javascript" src="/javascripts/xmlhr.js"></script> # <script type="text/javascript" src="/javascripts/xmlhr.js"></script>
# #
# javascript_include_tag "common.javascript", "/elsewhere/cools" # => # javascript_include_tag "common.javascript", "/elsewhere/cools" # =>
# <script language="JavaScript" type="text/javascript" src="/javascripts/common.javascript"></script> # <script type="text/javascript" src="/javascripts/common.javascript"></script>
# <script language="JavaScript" type="text/javascript" src="/elsewhere/cools.js"></script> # <script type="text/javascript" src="/elsewhere/cools.js"></script>
def javascript_include_tag(*sources) def javascript_include_tag(*sources)
sources.collect { |source| sources.collect { |source|
source = compute_public_path(source, 'javascripts', 'js') 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") }.join("\n")
end end


Expand Down

0 comments on commit d3a64c0

Please sign in to comment.