Created
August 23, 2011 17:03
-
-
Save scottmessinger/1165871 to your computer and use it in GitHub Desktop.
Monkeypatching a Gem
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
# utilities > carrierwave > storage > fog.rb | |
# utilities is in my autoload path | |
# after this, carrierwave ceased to work. I commented out the method, still nothing. | |
# it appears that the class completely clobbers the existing class.... | |
module CarrierWave | |
module Storage | |
class Fog < Abstract | |
class File | |
def rename_file(name) | |
connection.copy(bucket, @path, bucket, @path, directive=:replace, "content-disposition" => "attachment; filename = #{name}") | |
end | |
end | |
end # Fog | |
end # Storage | |
end # CarrierWave |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment