Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Initialize config.assets.version the same way it's done in Sprockets

  • Loading branch information...
commit d008c99f723a1623ab81bf111cc36b2101410d80 1 parent 509a98a
@spastorino spastorino authored
View
2  actionpack/lib/sprockets/railtie.rb
@@ -20,7 +20,7 @@ class Railtie < ::Rails::Railtie
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
View
1  railties/lib/rails/application/configuration.rb
@@ -37,6 +37,7 @@ def initialize(*)
@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
Please sign in to comment.
Something went wrong with that request. Please try again.