mirror of
https://github.com/internetee/registry.git
synced 2025-05-20 03:09:36 +02:00
parent
6d2bd0217d
commit
db884e82db
1 changed files with 1 additions and 7 deletions
|
@ -14,14 +14,8 @@ class AddZoneToPrices < ActiveRecord::Migration
|
|||
private
|
||||
|
||||
def assign_zone_to_current_prices
|
||||
p "Categories: #{Billing::Price.pluck(:category).uniq.sort}"
|
||||
p "Zone origins: #{DNS::Zone.origins.sort}"
|
||||
p 'Converting...'
|
||||
|
||||
Billing::Price.all.each do |price|
|
||||
p "Price: #{price.attributes}"
|
||||
p "Price category: #{price.category}"
|
||||
zone = DNS::Zone.find_by!(origin: price.category.strip)
|
||||
zone = DNS::Zone.find_by!(origin: price.category)
|
||||
price.zone = zone
|
||||
price.save!
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue