let rake task use orbit site's environment

This commit is contained in:
EricTYL 2019-10-09 16:41:17 +08:00
parent 5382ccdd9e
commit 585397f32f
1 changed files with 1 additions and 1 deletions

View File

@ -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