aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2011-08-08 07:42:49 -0700
committerJoshua Peek <josh@joshpeek.com>2011-08-08 07:42:49 -0700
commiteabc036496c4f4dbafdcedef7ec8e857fd08641d (patch)
tree7b1a7a15dc573186e177ca4903761ff2d3d1b106 /actionpack/lib
parent9e5140078fee49f4d1265dd4092f43d5e38128cb (diff)
parentc0bfb5a63c926abcee8df26ed7b7598ef763463a (diff)
downloadrails-eabc036496c4f4dbafdcedef7ec8e857fd08641d.tar.gz
rails-eabc036496c4f4dbafdcedef7ec8e857fd08641d.tar.bz2
rails-eabc036496c4f4dbafdcedef7ec8e857fd08641d.zip
Merge pull request #2448 from igrigorik/master
Asset pipeline fixes: clear out tmp cache and use environment in digest generation
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/sprockets/assets.rake2
-rw-r--r--actionpack/lib/sprockets/railtie.rb1
2 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake
index 50278cffcd..0349b2865e 100644
--- a/actionpack/lib/sprockets/assets.rake
+++ b/actionpack/lib/sprockets/assets.rake
@@ -16,7 +16,7 @@ namespace :assets do
end
desc "Remove compiled assets"
- task :clean => :environment do
+ task :clean => [:environment, 'tmp:cache:clear'] do
assets = Rails.application.config.assets
public_asset_path = Rails.public_path + assets.prefix
rm_rf public_asset_path, :secure => true
diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb
index c8438e6043..e1db3c52a3 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 + '-' + config.assets.version
if config.assets.cache_store != false
env.cache = ActiveSupport::Cache.lookup_store(config.assets.cache_store) || ::Rails.cache