aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/sprockets
diff options
context:
space:
mode:
authorjejacks0n <jejacks0n@gmail.com>2013-01-03 20:51:44 -0700
committerjejacks0n <jejacks0n@gmail.com>2013-01-10 13:41:52 -0700
commitf55ef82321c33a308c64e54c66b45e4fff542efa (patch)
treeb03852e20e717e0daeccf78eb2ccd00d5acdff86 /actionpack/lib/sprockets
parent11f5debcd5bbfaf51d2d2f24f2c5cee38f37fcdb (diff)
downloadrails-f55ef82321c33a308c64e54c66b45e4fff542efa.tar.gz
rails-f55ef82321c33a308c64e54c66b45e4fff542efa.tar.bz2
rails-f55ef82321c33a308c64e54c66b45e4fff542efa.zip
Fixes issue where duplicate assets can be required with sprockets.
- addresses the problem by calling flatten on asset array before calling uniq. - adds note to CHANGELOG.
Diffstat (limited to 'actionpack/lib/sprockets')
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb
index 690c71b472..bc573d8640 100644
--- a/actionpack/lib/sprockets/helpers/rails_helper.rb
+++ b/actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -31,7 +31,7 @@ module Sprockets
else
super(source.to_s, { :src => path_to_asset(source, :ext => 'js', :body => body, :digest => digest) }.merge!(options))
end
- end.uniq.join("\n").html_safe
+ end.flatten.uniq.join("\n").html_safe
end
def stylesheet_link_tag(*sources)
@@ -48,7 +48,7 @@ module Sprockets
else
super(source.to_s, { :href => path_to_asset(source, :ext => 'css', :body => body, :protocol => :request, :digest => digest) }.merge!(options))
end
- end.uniq.join("\n").html_safe
+ end.flatten.uniq.join("\n").html_safe
end
def asset_path(source, options = {})