Last active
December 16, 2015 01:29
-
-
Save rodrigopinto/5355425 to your computer and use it in GitHub Desktop.
Model using paranoia with paperclip should preserve file when deleting the record.
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
class Company < ActiveRecord::Base | |
has_attached_file :logo, :preserve_files => true | |
acts_as_paranoid | |
#... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment