Application_Form/custom_announcement/lib/tasks/custom_bulletin_tasks.rake

9 lines
281 B
Ruby

desc 'Remove duplicated custom_bulletins (custom_announcements) created by preview'
namespace :custom_bulletin do
task :remove_preview_custom_bulletins => [:environment] do
custom_bulletins = CustomBulletin.where(is_preview: true)
custom_bulletins.destroy_all
end
end