lib/fleximage/model.rb
# Returns original format of the image if the image_format column exists
# otherwise returns the globally set format.
Returns original format of the image if the image_format column exists
otherwise returns the globally set format.
Returns original format of the image if the image_format column exists otherwise returns the globally set format .
def extension
        if self.respond_to?( :image_format)
          case image_format
          when "JPEG"
            "jpg"
          else
            image_format ? image_format.downcase : self.class.image_storage_format
          end
        else
          self.class.image_storage_format
        end
      end
def extension if self . respond_to? ( :image_format ) case image_format when "JPEG" "jpg" else image_format ? image_format . downcase : self . class . image_storage_format end else self . class . image_storage_format end end
Returns original format of the image if the image_format column exists
otherwise returns the globally set format.
Returns original format of the image if the image_format column exists otherwise returns the globally set format .