Browse files

Merge pull request #2724 from guilleiguaran/avoid-recursive-call-spro…

…ckets-helper

Avoid extra recursive call in Sprockets helpers
  • Loading branch information...
2 parents 734792a + 381904d commit cfe7548aef1b005e49eacd8b0177764e77643ccf @spastorino spastorino committed Aug 29, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/sprockets/helpers/rails_helper.rb
View
4 actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -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))

0 comments on commit cfe7548

Please sign in to comment.