This repository was archived by the owner on Mar 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,12 @@ class Engine < ::Rails::Engine
3636 end
3737 end
3838
39- manifest_directory = config . assets . manifest || File . join ( ::Rails . public_path , config . assets . prefix )
39+ manifest_directory = if config . assets . manifest
40+ File . basename ( config . assets . manifest ) =~ /\. / ? File . dirname ( config . assets . manifest ) : config . assets . manifest
41+ else
42+ File . join ( ::Rails . public_path , config . assets . prefix )
43+ end
44+
4045 manifest_path = File . join ( manifest_directory , "rjs_manifest.yml" )
4146 config . requirejs . manifest_path = Pathname . new ( manifest_path )
4247 end
@@ -70,8 +75,7 @@ class Engine < ::Rails::Engine
7075 if ::Rails ::VERSION ::MAJOR >= 4
7176 config . after_initialize do |app |
7277 config = app . config
73- rails_manifest_path = File . join ( app . root , 'public' , config . assets . prefix )
74- rails_manifest = ::Sprockets ::Manifest . new ( app . assets , rails_manifest_path )
78+ rails_manifest = ::Sprockets ::Manifest . new ( app . assets , config . assets . manifest )
7579 if config . requirejs . manifest_path . exist? && rails_manifest
7680 rjs_digests = YAML . load ( ERB . new ( File . new ( config . requirejs . manifest_path ) . read ) . result )
7781 rails_manifest . assets . merge! ( rjs_digests )
You can’t perform that action at this time.
0 commit comments