Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fixes

  • Loading branch information...
commit 8a4e78a41d0bec03d3954f42c7f092fc7f284cb3 1 parent f62878e
@glebm glebm authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/overrides/premailer/premailer.rb
View
4 lib/overrides/premailer/premailer.rb
@@ -7,12 +7,12 @@
# This override handles these cases, while falling back to the default implementation.
def load_css_from_local_file_with_rails_path!(path)
# Remove query string and the path
- clean_path = path.sub(/\?.*$/, '').sub(%r(^https?://[^/]*), '')
+ clean_path = path.sub(/\?.*$/, '').sub(%r(^https?://[^/]*/), '')
rails_path = Rails.root.join('public', clean_path)
if File.exist?(rails_path)
load_css_from_string(File.read(rails_path))
elsif (asset = Rails.application.assets.find_asset(clean_path.sub("#{Rails.configuration.assets.prefix}/", '')))
- load_css_from_string(asset.to_s)
+ load_css_from_string(asset.source)
else
load_css_from_local_file_without_rails_path!(path)
end
Please sign in to comment.
Something went wrong with that request. Please try again.