public
Description: Paperclip File Management Plugin
Homepage: http://www.thoughtbot.com/projects/paperclip
Clone URL: git://github.com/thoughtbot/paperclip.git
Added some logging for the reprocessing task.
jyurek (author)
Tue Jul 29 11:35:08 -0700 2008
commit  d2ad7f06bc14a7495f9a89414b2446d5fcab957b
tree    34bd55b18f5ba3cbc220ec52182e35e727e938f0
parent  10968ea305a4f1e2fb74141d0661db57e4576dd1
...
174
175
176
 
 
 
 
177
178
179
...
174
175
176
177
178
179
180
181
182
183
0
@@ -174,6 +174,10 @@ module Paperclip
0
         post_process
0
 
0
         old_original.close if old_original.respond_to?(:close)
0
+
0
+ @errors.empty?
0
+ else
0
+ true
0
       end
0
     end
0
 
...
40
41
42
 
43
44
 
 
 
45
 
46
47
48
...
40
41
42
43
44
 
45
46
47
48
49
50
51
52
0
@@ -40,9 +40,13 @@ namespace :paperclip do
0
   namespace :refresh do
0
     desc "Regenerates thumbnails for a given CLASS (and optional ATTACHMENT)."
0
     task :thumbnails => :environment do
0
+ errors = []
0
       for_all_attachments do |instance, name|
0
- instance.send(name).reprocess!
0
+ result = instance.send(name).reprocess!
0
+ errors << [instance.id, instance.errors] unless instance.errors.blank?
0
+ result
0
       end
0
+ errors.each{|e| puts "#{e.first}: #{e.last.full_messages.inspect}" }
0
     end
0
 
0
     desc "Regenerates content_type/size metadata for a given CLASS (and optional ATTACHMENT)."

Comments

    No one has commented yet.