diff options
author | Santiago Pastorino <santiago@wyeworks.com> | 2011-08-08 12:49:10 -0300 |
---|---|---|
committer | Santiago Pastorino <santiago@wyeworks.com> | 2011-08-08 12:49:10 -0300 |
commit | 8360d7196515ba66fe5d535f6dbeeea5394e966a (patch) | |
tree | b22e1dd1b011a1ec0d12e75b2615d64eef5ba773 | |
parent | eabc036496c4f4dbafdcedef7ec8e857fd08641d (diff) | |
download | rails-8360d7196515ba66fe5d535f6dbeeea5394e966a.tar.gz rails-8360d7196515ba66fe5d535f6dbeeea5394e966a.tar.bz2 rails-8360d7196515ba66fe5d535f6dbeeea5394e966a.zip |
Initialize config.assets.version the same way it's done in Sprockets
-rw-r--r-- | actionpack/lib/sprockets/railtie.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails/application/configuration.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb index e1db3c52a3..0a2c8c1ea3 100644 --- a/actionpack/lib/sprockets/railtie.rb +++ b/actionpack/lib/sprockets/railtie.rb @@ -20,7 +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 + '-' + config.assets.version + env.version = ::Rails.env + "#{'-' + config.assets.version if config.assets.version.present?}" if config.assets.cache_store != false env.cache = ActiveSupport::Cache.lookup_store(config.assets.cache_store) || ::Rails.cache diff --git a/railties/lib/rails/application/configuration.rb b/railties/lib/rails/application/configuration.rb index 975e159999..cd850b6a75 100644 --- a/railties/lib/rails/application/configuration.rb +++ b/railties/lib/rails/application/configuration.rb @@ -37,6 +37,7 @@ module Rails @assets.paths = [] @assets.precompile = [ /\w+\.(?!js|css).+/, /application.(css|js)$/ ] @assets.prefix = "/assets" + @assets.version = '' @assets.cache_store = [ :file_store, "#{root}/tmp/cache/assets/" ] @assets.js_compressor = nil |