lib/bootstrap-sass/engine.rb in bootstrap-sass-3.3.5.1 vs lib/bootstrap-sass/engine.rb in bootstrap-sass-3.3.6
- old
+ new
@@ -3,10 +3,15 @@
class Engine < ::Rails::Engine
initializer 'bootstrap-sass.assets.precompile' do |app|
%w(stylesheets javascripts fonts images).each do |sub|
app.config.assets.paths << root.join('assets', sub).to_s
end
- app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff2?)$)
+
+ # sprockets-rails 3 tracks down the calls to `font_path` and `image_path`
+ # and automatically precompiles the referenced assets.
+ unless Sprockets::Rails::VERSION.split('.', 2)[0].to_i >= 3
+ app.config.assets.precompile << %r(bootstrap/glyphicons-halflings-regular\.(?:eot|svg|ttf|woff2?)$)
+ end
end
end
end
end