lib/jekyll/assets_plugin/environment/index_patch.rb in jekyll-assets-0.3.3 vs lib/jekyll/assets_plugin/environment/index_patch.rb in jekyll-assets-0.3.4
- old
+ new
@@ -2,17 +2,11 @@
module AssetsPlugin
class Environment
module IndexPatch
def find_asset path, options = {}
- site = @environment.site
- asset = super
- bundle = options[:bundle]
-
- if asset and bundle and not site.static_files.include? asset
- site.static_files << AssetFile.new(site, asset)
- end
-
+ asset = super
+ @environment.site.bundle_asset! asset if asset and options[:bundle]
asset
end
end
end