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
d00c04e3
Commit
d00c04e3
authored
Aug 26, 2011
by
Mike Burns
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the formatting
parent
472a625a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
lib/paperclip.rb
+2
-2
test/attachment_test.rb
+4
-4
No files found.
lib/paperclip.rb
View file @
d00c04e3
...
...
@@ -411,14 +411,14 @@ module Paperclip
attachment
.
send
(
:flush_deletes
)
end
end
def
prepare_for_destroy
Paperclip
.
log
(
"Scheduling attachments for deletion."
)
each_attachment
do
|
name
,
attachment
|
attachment
.
send
(
:queue_existing_for_delete
)
end
end
end
end
test/attachment_test.rb
View file @
d00c04e3
...
...
@@ -1076,7 +1076,7 @@ class AttachmentTest < Test::Unit::TestCase
assert_equal
"hello"
,
attachment
.
url
end
end
context
"An attached file"
do
setup
do
rebuild_model
...
...
@@ -1084,8 +1084,8 @@ class AttachmentTest < Test::Unit::TestCase
@file
=
File
.
new
(
File
.
join
(
File
.
dirname
(
__FILE__
),
"fixtures"
,
"5k.png"
),
'rb'
)
@dummy
.
avatar
=
@file
@dummy
.
save!
@attachment
=
@dummy
.
avatar
@path
=
@attachment
.
path
@attachment
=
@dummy
.
avatar
@path
=
@attachment
.
path
end
should
"not be deleted when the model fails to destroy"
do
...
...
@@ -1103,5 +1103,5 @@ class AttachmentTest < Test::Unit::TestCase
assert
!
File
.
exists?
(
@path
)
end
end
end
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