diff options
author | Ilya Grigorik <ilya@igvita.com> | 2011-08-04 23:48:40 -0400 |
---|---|---|
committer | Ilya Grigorik <ilya@igvita.com> | 2011-08-04 23:53:32 -0400 |
commit | ed5c6d254c9ef5d44a11159561fddde7a3033874 (patch) | |
tree | 57009382e87c73bacc5a77929e5ceafd5605060a /actionpack/lib/sprockets | |
parent | e44efac0865a66b0546e32b4c6f23605a98a5845 (diff) | |
download | rails-ed5c6d254c9ef5d44a11159561fddde7a3033874.tar.gz rails-ed5c6d254c9ef5d44a11159561fddde7a3033874.tar.bz2 rails-ed5c6d254c9ef5d44a11159561fddde7a3033874.zip |
generate environment dependent asset digests
If two different environments are configured to use the pipeline, but
one has an extra step (such as compression) then without taking the
environment into account you may end up serving wrong assets
Diffstat (limited to 'actionpack/lib/sprockets')
-rw-r--r-- | actionpack/lib/sprockets/railtie.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb index c8438e6043..0c2eb5075b 100644 --- a/actionpack/lib/sprockets/railtie.rb +++ b/actionpack/lib/sprockets/railtie.rb @@ -20,6 +20,7 @@ module Sprockets app.assets = Sprockets::Environment.new(app.root.to_s) do |env| env.static_root = File.join(app.root.join('public'), config.assets.prefix) env.logger = ::Rails.logger + env.version = ::Rails.env + '-' + env.version if config.assets.cache_store != false env.cache = ActiveSupport::Cache.lookup_store(config.assets.cache_store) || ::Rails.cache |