app/cells/decidim/initiatives/initiative_g_cell.rb in decidim-initiatives-0.28.2 vs app/cells/decidim/initiatives/initiative_g_cell.rb in decidim-initiatives-0.28.3
- old
+ new
@@ -9,19 +9,17 @@
def resource_path
Decidim::Initiatives::Engine.routes.url_helpers.initiative_path(model)
end
- def has_image?
- image.present?
- end
-
def image
@image ||= model.attachments.find(&:image?)
end
- def resource_image_path
- image.url if has_image?
+ def resource_image_url
+ return if image.blank?
+
+ image.url
end
def metadata_cell
"decidim/initiatives/initiative_metadata_g"
end