diff options
author | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-01-10 12:43:31 -0800 |
---|---|---|
committer | Guillermo Iguaran <guilleiguaran@gmail.com> | 2013-01-10 12:43:31 -0800 |
commit | 002dfba66490d289bac897d1ba886310a672e779 (patch) | |
tree | b03852e20e717e0daeccf78eb2ccd00d5acdff86 /actionpack/lib/sprockets/helpers | |
parent | 11f5debcd5bbfaf51d2d2f24f2c5cee38f37fcdb (diff) | |
parent | f55ef82321c33a308c64e54c66b45e4fff542efa (diff) | |
download | rails-002dfba66490d289bac897d1ba886310a672e779.tar.gz rails-002dfba66490d289bac897d1ba886310a672e779.tar.bz2 rails-002dfba66490d289bac897d1ba886310a672e779.zip |
Merge pull request #8735 from jejacks0n/duplicate_asset_fix
Ensure assets aren't duplicated when using sprockets require.
Diffstat (limited to 'actionpack/lib/sprockets/helpers')
-rw-r--r-- | actionpack/lib/sprockets/helpers/rails_helper.rb | 4 |
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 = {}) |