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

Fix javascript_tag method name collision. Closes #10337.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8368 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
上级 4b055a4a
*SVN*
* Ensure asset cache directories are automatically created. #10337 [Josh Peek]
* Ensure asset cache directories are automatically created. #10337 [Josh Peek, Chu Yeow]
* render :xml and :json preserve custom content types. #10388 [jmettraux, Chu Yeow]
......
......@@ -202,9 +202,9 @@ def javascript_include_tag(*sources)
joined_javascript_path = File.join(JAVASCRIPTS_DIR, joined_javascript_name)
write_asset_file_contents(joined_javascript_path, compute_javascript_paths(sources))
javascript_tag(joined_javascript_name, options)
javascript_src_tag(joined_javascript_name, options)
else
expand_javascript_sources(sources).collect { |source| javascript_tag(source, options) }.join("\n")
expand_javascript_sources(sources).collect { |source| javascript_src_tag(source, options) }.join("\n")
end
end
......@@ -461,7 +461,7 @@ def rewrite_asset_path!(source)
source << "?#{asset_id}" if !asset_id.blank?
end
def javascript_tag(source, options)
def javascript_src_tag(source, options)
content_tag("script", "", { "type" => Mime::JS, "src" => path_to_javascript(source) }.merge(options))
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册