event_news/lib/tasks/bulletin_tasks.rake

9 lines
233 B
Ruby

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