public
Description: Rails plugin for uploading images as resources, with support for resizing, text stamping, and other special effects.
Homepage: http://fleximage.rubyforge.org
Clone URL: git://github.com/Squeegy/fleximage.git
Fixed that image would initially try to load from a file even if no 
image_directory was declared.
Squeegy (author)
Sat May 31 13:53:10 -0700 2008
commit  fe563024079feda6f0406f6917cf265dd7657201
tree    7d6e42eb8968835bfeb8423d90347a2d8b949f76
parent  9b1d211b20a57df6bad04c272181182641071006
...
91
92
93
 
 
 
 
94
95
96
...
327
328
329
330
331
332
 
 
 
 
 
 
 
333
334
 
335
336
337
 
338
339
340
...
91
92
93
94
95
96
97
98
99
100
...
331
332
333
 
 
 
334
335
336
337
338
339
340
341
 
342
343
344
 
345
346
347
348
0
@@ -91,6 +91,10 @@ module Fleximage
0
           end
0
         end
0
         
0
+ def self.has_store?
0
+ db_store? || image_directory
0
+ end
0
+
0
         # validation callback
0
         validate :validate_image
0
         
0
@@ -327,14 +331,18 @@ module Fleximage
0
         return @output_image if @output_image
0
         
0
         # Load the image from disk
0
- if self.class.db_store?
0
- if image_file_data && image_file_data.any?
0
- @output_image = Magick::Image.from_blob(image_file_data).first
0
+ if self.class.has_store?
0
+ if self.class.db_store?
0
+ if image_file_data && image_file_data.any?
0
+ @output_image = Magick::Image.from_blob(image_file_data).first
0
+ else
0
+ master_image_not_found
0
+ end
0
           else
0
- master_image_not_found
0
+ @output_image = Magick::Image.read(file_path).first
0
           end
0
         else
0
- @output_image = Magick::Image.read(file_path).first
0
+ master_image_not_found
0
         end
0
         
0
       rescue Magick::ImageMagickError => e

Comments

    No one has commented yet.