event_news/lib/tasks/event_news_tasks.rake

9 lines
223 B
Ruby
Raw Normal View History

2020-07-31 06:52:33 +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