From 585397f32fcf041d51c25fd63d812bdce5e02bd3 Mon Sep 17 00:00:00 2001 From: Eric Tsai Date: Wed, 9 Oct 2019 16:41:17 +0800 Subject: [PATCH] let rake task use orbit site's environment --- lib/tasks/bulletin_tasks.rake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/tasks/bulletin_tasks.rake b/lib/tasks/bulletin_tasks.rake index ea6425e..434204a 100644 --- a/lib/tasks/bulletin_tasks.rake +++ b/lib/tasks/bulletin_tasks.rake @@ -1,7 +1,7 @@ desc 'Remove duplicated bulletins (announcements) created by preview' namespace :bulletin do - task :remove_preview_bulletins do + task :remove_preview_bulletins => [:environment] do bulletins = Bulletin.where(is_preview: true) bulletins.destroy_all end