We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42d7221 commit 6879d32Copy full SHA for 6879d32
lib/overrides/premailer/premailer.rb
@@ -9,7 +9,7 @@ def load_css_from_local_file!(path)
9
# Remove query string and the path
10
clean_path = path.sub(/\?.*$/, '').sub(%r(^https?://[^/]*/), '')
11
rails_path = Rails.root.join('public', clean_path)
12
- if File.exist?(rails_path)
+ if File.file?(rails_path)
13
load_css_from_string(File.read(rails_path))
14
elsif (asset = Rails.application.assets.find_asset(clean_path.sub("#{Rails.configuration.assets.prefix}/", '')))
15
load_css_from_string(asset.source)
0 commit comments