aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/sprockets
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-08-08 12:49:10 -0300
committerSantiago Pastorino <santiago@wyeworks.com>2011-08-08 12:49:10 -0300
commit8360d7196515ba66fe5d535f6dbeeea5394e966a (patch)
treeb22e1dd1b011a1ec0d12e75b2615d64eef5ba773 /actionpack/lib/sprockets
parenteabc036496c4f4dbafdcedef7ec8e857fd08641d (diff)
downloadrails-8360d7196515ba66fe5d535f6dbeeea5394e966a.tar.gz
rails-8360d7196515ba66fe5d535f6dbeeea5394e966a.tar.bz2
rails-8360d7196515ba66fe5d535f6dbeeea5394e966a.zip
Initialize config.assets.version the same way it's done in Sprockets
Diffstat (limited to 'actionpack/lib/sprockets')
-rw-r--r--actionpack/lib/sprockets/railtie.rb2
1 files changed, 1 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