Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 144ed52

Browse files
Add tmp fix for manifest name installs
1 parent 794b744 commit 144ed52

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

‎lib/critical_path_css/rails/config_loader.rb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,12 @@ def format_css_paths
2222
if config['css_path']
2323
config['css_path'] = format_path(config['css_path'])
2424
config['css_paths'] = []
25-
else
25+
elsifconfig['css_paths']
2626
config['css_path'] = ''
2727
config['css_paths'] = config['css_paths'].collect { |path| format_path(path) }
28+
else
29+
config['css_path'] = ActionController::Base.helpers.stylesheet_path(config['manifest_name'], host: '')
30+
config['css_paths'] = []
2831
end
2932
end
3033

‎spec/lib/critical_path_css/rails/config_loader_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
}
8282

8383
it 'sets css_path with the path' do
84-
expect(subject.config['css_path']).to eq '/app/spec/internal/public/test.css'
84+
expect(subject.config['css_path']).to eq '/stylesheets/application.css'
8585
end
8686

8787
it 'leaves css_paths empty' do

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /