mirror of
https://github.com/internetee/registry.git
synced 2025-08-18 15:33:52 +02:00
parent
e9895df211
commit
7ba0b2e2ae
1 changed files with 0 additions and 15 deletions
|
@ -1,15 +0,0 @@
|
||||||
namespace :convert do
|
|
||||||
desc 'Convert punycodes to unicode'
|
|
||||||
task punycode: :environment do
|
|
||||||
start = Time.zone.now.to_f
|
|
||||||
|
|
||||||
puts "-----> Convert domain punycodes to unicode..."
|
|
||||||
|
|
||||||
count = 0
|
|
||||||
Domain.find_each(:batch_size => 1000) do |x|
|
|
||||||
count += 1
|
|
||||||
x.update_column(:name_puny, (SimpleIDN.to_unicode(x.name)))
|
|
||||||
end
|
|
||||||
puts "-----> all done in #{(Time.zone.now.to_f - start).round(2)} seconds"
|
|
||||||
end
|
|
||||||
end
|
|
Loading…
Add table
Add a link
Reference in a new issue