aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/sprockets
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/sprockets')
-rw-r--r--actionpack/lib/sprockets/helpers/rails_helper.rb3
-rw-r--r--actionpack/lib/sprockets/railtie.rb4
2 files changed, 5 insertions, 2 deletions
diff --git a/actionpack/lib/sprockets/helpers/rails_helper.rb b/actionpack/lib/sprockets/helpers/rails_helper.rb
index 0b6bd8ca40..b977fabdaa 100644
--- a/actionpack/lib/sprockets/helpers/rails_helper.rb
+++ b/actionpack/lib/sprockets/helpers/rails_helper.rb
@@ -1,4 +1,3 @@
-require "action_view/helpers/asset_paths"
require "action_view/helpers/asset_tag_helper"
module Sprockets
@@ -71,7 +70,7 @@ module Sprockets
body ? "#{path}?body=1" : path
end
- class AssetPaths < ActionView::Helpers::AssetPaths #:nodoc:
+ class AssetPaths < ::ActionView::AssetPaths #:nodoc:
def compute_public_path(source, dir, ext=nil, include_host=true)
super(source, Rails.application.config.assets.prefix, ext, include_host)
end
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.