Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
paperclip
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ikcrm_common
paperclip
Commits
266a32a5
Commit
266a32a5
authored
May 09, 2014
by
Prem Sichanugrist
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1509 from drewcimino/soft-delete-doc
added :preserve_files notes to the README
parents
69e16358
925d54d3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
README.md
+13
-0
No files found.
README.md
View file @
266a32a5
...
@@ -607,6 +607,19 @@ class AddAvatarFingerprintColumnToUser < ActiveRecord::Migration
...
@@ -607,6 +607,19 @@ class AddAvatarFingerprintColumnToUser < ActiveRecord::Migration
end
end
```
```
File Preservation for Soft-Delete
-------
An option is available to preserve attachments in order to play nicely with soft-deleted models. (acts_as_paranoid, paranoia, etc.)
```
ruby
has_attached_file
:some_attachment
,
{
:preserve_files
=>
"true"
,
}
```
This will prevent
```some_attachment```
from being wiped out when the model gets destroyed, so it will still exist when the object is restored later.
Custom Attachment Processors
Custom Attachment Processors
-------
-------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment