A better setting to check if we are precompiling

This commit is contained in:
Chris Eppstein 2011-09-17 07:44:49 -07:00
parent fe4edff7d4
commit 5fd2c14d06

View File

@ -54,7 +54,7 @@ class Rails::Railtie::Configuration
# hash or some metadata that is opaque to sprockets that could be read from the # hash or some metadata that is opaque to sprockets that could be read from the
# asset's attributes, we could avoid cluttering the assets directory with generated # asset's attributes, we could avoid cluttering the assets directory with generated
# sprites and always just use the logical_path + data version of the api. # sprites and always just use the logical_path + data version of the api.
if Rails.application.config.action_controller.perform_caching if Rails.application.config.assets.digests.try(:any?)
asset = Rails.application.assets.find_asset(filename) asset = Rails.application.assets.find_asset(filename)
pathname = Pathname.new(filename) pathname = Pathname.new(filename)
logical_path = filename[(Compass.configuration.generated_images_path.length+1)..-1] logical_path = filename[(Compass.configuration.generated_images_path.length+1)..-1]