lib/fleximage/model.rb
# Returns the path to the master image file for this record.
#   
#   @some_image.directory_path #=> /var/www/myapp/uploaded_images
#
# If this model has a created_at field, it will use a directory 
# structure based on the creation date, to prevent hitting the OS imposed
# limit on the number files in a directory.
#
#   @some_image.directory_path #=> /var/www/myapp/uploaded_images/2008/3/30
Returns the path to the master image file for this record.

If this model has a created_at field, it will use a directory
structure based on the creation date, to prevent hitting the OS imposed
limit on the number files in a directory.


Returns the path to the master image file for this record . If this model has a created_at field it will use a directory structure based on the creation date to prevent hitting the OS imposed limit on the number files in a directory .
def has_saved_image?
        if self.class.db_store?
          !!image_file_data
        elsif self.class.s3_store?
          AWS::S3::S3Object.exists?("#{id}.#{self.class.image_storage_format}", self.class.s3_bucket)
        elsif self.class.file_store?
          File.exists?(file_path)
        end
      end
def has_saved_image? if self . class . db_store? ! ! image_file_data elsif self . class . s3_store? AWS :: S3 :: S3Object . exists? ( "#{id}.#{self.class.image_storage_format}" , self . class . s3_bucket ) elsif self . class . file_store? File . exists? ( file_path ) end end
Returns the path to the master image file for this record.
Returns the path to the master image file for this record .