From 01298449cc1a132b3008691f569001ba53a45452 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Mon, 3 Aug 2015 11:30:45 +0200 Subject: [PATCH] Find organization image suggestion and store it as app logo, sync it to assets folder. --- lib/service/image.rb | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/service/image.rb b/lib/service/image.rb index 0d3b87c7c..4dd1fb78b 100644 --- a/lib/service/image.rb +++ b/lib/service/image.rb @@ -56,7 +56,7 @@ returns =begin -find organization image suggestion +find organization image suggestion and store it as app logo result = Service::Image.organization_suggest('edenhofer.de') @@ -72,7 +72,14 @@ returns backend = load_adapter_by_setting( 'image_backend' ) return if !backend - backend.organization_suggest(domain) + result = backend.organization_suggest(domain) + + # sync logo to assets folder + if result + StaticAssets.sync + end + + result end end