aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorJoshua Peek <josh@joshpeek.com>2011-06-21 09:38:25 -0500
committerJoshua Peek <josh@joshpeek.com>2011-06-21 09:39:37 -0500
commit4a2b3275a167d6452c4c6b4453bc7406d13e8377 (patch)
treea2397ec4c3bb9573b9a214b5a7da9670a617f199 /actionpack
parent5a26b886455a9fda846109dbcf4595b107e392bc (diff)
downloadrails-4a2b3275a167d6452c4c6b4453bc7406d13e8377.tar.gz
rails-4a2b3275a167d6452c4c6b4453bc7406d13e8377.tar.bz2
rails-4a2b3275a167d6452c4c6b4453bc7406d13e8377.zip
Assign Rails.cache to sprockets
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/sprockets/railtie.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb
index 38eb00ce01..ab5101f6fc 100644
--- a/actionpack/lib/sprockets/railtie.rb
+++ b/actionpack/lib/sprockets/railtie.rb
@@ -63,6 +63,10 @@ module Sprockets
env.logger = Rails.logger
+ if env.respond_to?(:cache)
+ env.cache = Rails.cache
+ end
+
if assets.compress
# temporarily hardcode default JS compressor to uglify. Soon, it will work
# the same as SCSS, where a default plugin sets the default.