Created
August 28, 2014 08:02
-
-
Save kzaitsev/c2ebf3377201ed51333b to your computer and use it in GitHub Desktop.
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
if ENV['RAILS_ENV'] == 'production' | |
puts "USING PATCHED CARRIERWAVE" | |
module CarrierWave | |
module Uploader | |
module Url | |
def url(options = {}) | |
if file.respond_to?(:path) | |
path = encode_path(file.path.gsub(File.expand_path(root), '')) | |
"/#{path}" | |
else | |
"/not_found.png" | |
end | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment