提交 381904d2 编写于 作者: G Guillermo Iguaran

Avoid extra recursive call in Sprockets helpers

上级 734792aa
......@@ -26,7 +26,7 @@ def javascript_include_tag(*sources)
sources.collect do |source|
if debug && asset = asset_paths.asset_for(source, 'js')
asset.to_a.map { |dep|
javascript_include_tag(dep, options.merge({ :debug => false, :body => true }))
super(dep.to_s, { :src => asset_path(dep, 'js', true) }.merge!(options))
}
else
super(source.to_s, { :src => asset_path(source, 'js', body) }.merge!(options))
......@@ -42,7 +42,7 @@ def stylesheet_link_tag(*sources)
sources.collect do |source|
if debug && asset = asset_paths.asset_for(source, 'css')
asset.to_a.map { |dep|
stylesheet_link_tag(dep, options.merge({ :debug => false, :body => true }))
super(dep.to_s, { :href => asset_path(dep, 'css', true, :request) }.merge!(options))
}
else
super(source.to_s, { :href => asset_path(source, 'css', body, :request) }.merge!(options))
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册