Skip to content

Instantly share code, notes, and snippets.

@rodrigopinto
Last active December 16, 2015 01:29
Show Gist options
  • Save rodrigopinto/5355425 to your computer and use it in GitHub Desktop.
Save rodrigopinto/5355425 to your computer and use it in GitHub Desktop.
Model using paranoia with paperclip should preserve file when deleting the record.
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