event_ann/lib/tasks/bulletin_tasks.rake

9 lines
259 B
Ruby
Raw Permalink Normal View History

2020-07-13 08:04:57 +00:00
desc 'Remove duplicated bulletin_events (event_anns) created by preview'
namespace :bulletin_event do
task :remove_preview_bulletins => [:environment] do
bulletin_events = BulletinEvent.where(is_preview: true)
bulletin_events.destroy_all
end
end