Created
August 3, 2012 11:56
-
-
Save mediasota/3246924 to your computer and use it in GitHub Desktop.
Delete original image when using Paperclip/Rails 3
This file contains hidden or 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
after_save :destroy_original | |
private | |
def destroy_original | |
File.unlink(self.photo.path) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment