Created
May 2, 2015 10:15
-
-
Save daniel-rikowski/a96dd7b62accb158ce8a to your computer and use it in GitHub Desktop.
Money patch for premailer-rails and Sprockets 3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Premailer::Rails::CSSLoaders::AssetPipelineLoader.class_eval do | |
def self.file_name(url) | |
URI(url).path | |
.sub("#{::Rails.configuration.assets.prefix}/", '') | |
.sub(/-\h{32,}\.css$/, '.css') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment