public
Description: Rails plugin for uploading images as resources, with support for resizing, text stamping, and other special effects.
Homepage: http://wiki.github.com/Squeegy/fleximage
Clone URL: git://github.com/Squeegy/fleximage.git
Don't need to delete file after destory if using db_store (and trying to do so 
results in an error if image_directory wasn't set)
jlsync (author)
Sat May 24 16:44:34 -0700 2008
commit  8d801232e5482b9328f731d8350236eafb4e36f4
tree    881d8ca6099104b96c9f4a2e7779665a909e3dae
parent  b1055a2b1ca55dddd8cfde5993aa8f959390cee4
...
357
358
359
360
 
361
362
363
...
463
464
465
466
467
 
...
357
358
359
 
360
361
362
363
...
463
464
465
 
466
467
0
@@ -357,7 +357,7 @@ module Fleximage
0
       # Delete the image file for this record. This is automatically ran after this record gets 
0
       # destroyed, but you can call it manually if you want to remove the image from the record.
0
       def delete_image_file
0
-        File.delete(file_path) if File.exists?(file_path)
0
+        File.delete(file_path) if (!self.class.db_store? && File.exists?(file_path))
0
       end
0
       
0
       # Execute image presence and validity validations.
0
@@ -463,4 +463,4 @@ module Fleximage
0
     end
0
     
0
   end
0
-end
0
\ No newline at end of file
0
+end

Comments