announcement-test/lib/tasks/bulletin_tasks.rake

9 lines
215 B
Ruby

desc 'Remove duplicated bulletins (announcements) created by preview'
namespace :bulletin do
task :remove_preview_bulletins do
bulletins = Bulletin.where(is_preview: true)
bulletins.destroy_all
end
end