announcement-test/lib/tasks/bulletin_tasks.rake

9 lines
233 B
Ruby
Raw Permalink Normal View History

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