From 6575bc10db93db383ff1d6a5d5b665fd9c98edab Mon Sep 17 00:00:00 2001 From: Henne Vogelsang Date: Thu, 19 May 2016 15:48:27 +0200 Subject: [PATCH] Adapt the logo data migration task to carrierwave --- lib/tasks/logo.rake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/tasks/logo.rake b/lib/tasks/logo.rake index cea95113..468b6d72 100644 --- a/lib/tasks/logo.rake +++ b/lib/tasks/logo.rake @@ -1,6 +1,8 @@ -namespace :logo do - desc 'Resize existing logo of sponsors after change in image manipulation specifications' - task reprocess: :environment do - Sponsor.find_each { |s| s.logo.reprocess! } +namespace :data do + namespace :migrate do + desc 'Resize existing logo of sponsors after change in image manipulation specifications' + task logo_reprocess: :environment do + Sponsor.find_each { |s| s.picture.recreate_versions! if s.picture? } + end end end