lib/fiona7/scrivito_patches/binary.rb in infopark_fiona7-0.71.0.0 vs lib/fiona7/scrivito_patches/binary.rb in infopark_fiona7-0.71.0.1
- old
+ new
@@ -71,10 +71,14 @@
def length
self.obj.body_length
end
+ def image?
+ self.obj.image?
+ end
+
def width
self.cache("#{self.last_changed}-width") do
if self.image
self.image[:width]
else
@@ -211,10 +215,10 @@
end
delegate :valid?, :present?,
:filename, :filepath,
:mime_type, :length, :last_changed,
- :width, :height,
+ :image?, :width, :height,
:to => :implementation
def initialize(binary_id, transformation=false)
if transformation
self.implementation = TransformedBinary.new(binary_id, transformation)