app/models/spina/image.rb in spina-1.1.0 vs app/models/spina/image.rb in spina-1.1.1
- old
+ new
@@ -13,10 +13,14 @@
def name
file.try(:filename).to_s
end
def variant(options)
- file.attached? ? file.variant(options) : ""
+ return "" unless file.attached?
+ return file if file.content_type.include?('svg')
+ return file unless file.variable?
+
+ file.variant(options)
end
def content
self
end