aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/sprockets/assets.rake3
-rw-r--r--actionpack/lib/sprockets/railtie.rb8
2 files changed, 9 insertions, 2 deletions
diff --git a/actionpack/lib/sprockets/assets.rake b/actionpack/lib/sprockets/assets.rake
index 54907abb39..6f38ece0c3 100644
--- a/actionpack/lib/sprockets/assets.rake
+++ b/actionpack/lib/sprockets/assets.rake
@@ -21,6 +21,7 @@ namespace :assets do
env = Rails.application.assets
target = Pathname.new(File.join(Rails.public_path, config.assets.prefix))
manifest = {}
+ manifest_path = config.assets.manifest || target
if env.respond_to?(:each_logical_path)
config.assets.precompile.each do |path|
@@ -47,7 +48,7 @@ namespace :assets do
env.precompile(*assets)
end
- File.open("#{target}/manifest.yml", 'w') do |f|
+ File.open("#{manifest_path}/manifest.yml", 'w') do |f|
YAML.dump(manifest, f)
end
end
diff --git a/actionpack/lib/sprockets/railtie.rb b/actionpack/lib/sprockets/railtie.rb
index 4adfd000f8..7927b7bc2c 100644
--- a/actionpack/lib/sprockets/railtie.rb
+++ b/actionpack/lib/sprockets/railtie.rb
@@ -26,7 +26,13 @@ module Sprockets
end
end
- if File.exist?(path = File.join(Rails.public_path, config.assets.prefix, "manifest.yml"))
+ if config.assets.manifest
+ path = File.join(config.assets.manifest, "manifest.yml")
+ else
+ path = File.join(Rails.public_path, config.assets.prefix, "manifest.yml")
+ end
+
+ if File.exist?(path)
config.assets.digests = YAML.load_file(path)
end