Add different ip version support to nameserver

This commit is contained in:
Martin Lensment 2014-08-13 17:11:10 +03:00
parent a846a51444
commit 793b0d22ff
7 changed files with 18 additions and 13 deletions

View file

@ -113,10 +113,10 @@ class Domain < ActiveRecord::Base
if ns[:hostAddr]
if ns[:hostAddr].is_a?(Array)
ns[:hostAddr].each do |ip|
attrs[:ip] = ip unless attrs[:ip]
attrs[:ipv4] = ip unless attrs[:ipv4]
end
else
attrs[:ip] = ns[:hostAddr]
attrs[:ipv4] = ns[:hostAddr]
end
end