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
d2ad7f06
Commit
d2ad7f06
authored
Jul 29, 2008
by
Jon Yurek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added some logging for the reprocessing task.
parent
10968ea3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
+9
-1
lib/paperclip/attachment.rb
+4
-0
tasks/paperclip_tasks.rake
+5
-1
No files found.
lib/paperclip/attachment.rb
View file @
d2ad7f06
...
...
@@ -174,6 +174,10 @@ module Paperclip
post_process
old_original
.
close
if
old_original
.
respond_to?
(
:close
)
@errors
.
empty?
else
true
end
end
...
...
tasks/paperclip_tasks.rake
View file @
d2ad7f06
...
...
@@ -40,9 +40,13 @@ namespace :paperclip do
namespace
:refresh
do
desc
"Regenerates thumbnails for a given CLASS (and optional ATTACHMENT)."
task
:thumbnails
=>
:environment
do
errors
=
[]
for_all_attachments
do
|
instance
,
name
|
instance
.
send
(
name
).
reprocess!
result
=
instance
.
send
(
name
).
reprocess!
errors
<<
[
instance
.
id
,
instance
.
errors
]
unless
instance
.
errors
.
blank?
result
end
errors
.
each
{
|
e
|
puts
"
#{
e
.
first
}
:
#{
e
.
last
.
full_messages
.
inspect
}
"
}
end
desc
"Regenerates content_type/size metadata for a given CLASS (and optional ATTACHMENT)."
...
...
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