assign auction type for nil value rake task

This commit is contained in:
olegphenomenon 2022-07-25 14:41:27 +03:00
parent 73a4364196
commit 3fc79f96c2
2 changed files with 39 additions and 0 deletions

View file

@ -0,0 +1,12 @@
# frozen_string_literal: true
namespace :auction do
desc 'Check closed disputes with expired_at in the Past'
task assign_platform_type: :environment do
auctions = Auction.where(platform: nil)
auctions.each do |auction|
auction.update(platform: :auto)
end
end
end