Skip to content

Commit b122897

Browse files
author
Robert Mosolgo
authored
Merge pull request reactjs#598 from drborges/master
Use assets prefix in yaml manifest path
2 parents 3fe755e + e4850ed commit b122897

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/react/server_rendering/yaml_manifest_container.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ module ServerRendering
66
# but sometimes, they're compiled to other directories (or other servers)
77
class YamlManifestContainer
88
def initialize
9-
@assets = YAML.load_file(::Rails.root.join("public/assets/manifest.yml"))
9+
@assets = YAML.load_file(::Rails.root.join("public", ::Rails.application.config.assets.prefix, "manifest.yml"))
1010
end
1111

1212
def find_asset(logical_path)
1313
asset_path = @assets[logical_path] || raise("No compiled asset for #{logical_path}, was it precompiled?")
14-
asset_full_path = ::Rails.root.join("public", "assets", asset_path)
14+
asset_full_path = ::Rails.root.join("public", ::Rails.application.config.assets.prefix, asset_path)
1515
File.read(asset_full_path)
1616
end
1717

0 commit comments

Comments
 (0)