Browse files

Assign Rails.cache to sprockets

  • Loading branch information...
1 parent c4794b0 commit 9324b54c33d9b07964f315cd70ac0f283c54fdf6 @josh josh committed Jun 21, 2011
Showing with 4 additions and 0 deletions.
  1. +4 −0 actionpack/lib/sprockets/railtie.rb
View
4 actionpack/lib/sprockets/railtie.rb
@@ -63,6 +63,10 @@ def asset_environment(app)
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.

0 comments on commit 9324b54

Please sign in to comment.