custom_announcement/lib/tasks/custom_bulletin_tasks.rake

9 lines
281 B
Ruby
Raw Normal View History

2021-06-17 10:52:39 +00:00
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