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
Search Repo:
has_image? should be more reliable
Squeegy (author)
Mon Apr 14 18:05:32 -0700 2008
commit  35ff72e0c5c5ad6fa56635ec59018f476f3c49d7
tree    fcfeb8b080dcefac89c19f1fb3172ce4e82cc6d5
parent  acc62eeab73be0f8a6a0622c9fb3358802f0ad00
...
261
262
263
264
 
 
 
 
 
 
 
265
266
267
...
261
262
263
 
264
265
266
267
268
269
270
271
272
273
0
@@ -261,7 +261,13 @@ module Fleximage
0
       
0
       # Return true if this record has an image.
0
       def has_image?
0
- self.class.db_store? ? image_file_data : File.exists?(file_path)
0
+ instance_image = @uploaded_image || @output_image
0
+
0
+ if instance_image
0
+ instance_image
0
+ else
0
+ self.class.db_store? ? image_file_data : File.exists?(file_path)
0
+ end
0
       end
0
       
0
       # Call from a .flexi view template. This enables the rendering of operators

Comments

    No one has commented yet.