event_news/lib/tasks/event_news_tasks.rake

9 lines
231 B
Ruby
Raw Normal View History

2022-01-21 02:09:31 +00:00
desc 'Remove duplicated EventNews created by preview'
namespace :event_news do
task :remove_preview_event_news => [:environment] do
event_news = EventNews.where(is_preview: true)
event_news.destroy_all
end
end