Skip to content

Commit

Permalink
Avoid extra recursive call in Sprockets helpers
Browse files Browse the repository at this point in the history
  • Loading branch information
guilleiguaran committed Aug 29, 2011
1 parent 734792a commit 381904d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions actionpack/lib/sprockets/helpers/rails_helper.rb
Expand Up @@ -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))
Expand All @@ -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))
Expand Down

0 comments on commit 381904d

Please sign in to comment.