fixed codeclimate errors (partically)

This commit is contained in:
dinsmol 2021-09-09 09:19:09 +03:00
parent 3f41ce4ab4
commit f4e0084895
103 changed files with 339 additions and 367 deletions

View file

@ -89,13 +89,11 @@ module Repp
return contacts.pluck(:code) unless details
contacts = contacts.map do |contact|
contacts.map do |contact|
serializer = ::Serializers::Repp::Contact.new(contact,
show_address: Contact.address_processing?)
serializer.to_json
end
contacts
end
def opt_addr?

View file

@ -53,7 +53,7 @@ module Repp
end
def nameserver_params
params.permit(:domain_id, nameservers: [[:hostname, :action, ipv4: [], ipv6: []]])
params.permit(:domain_id, nameservers: [[:hostname, :action, { ipv4: [], ipv6: [] }]])
end
end
end

View file

@ -223,7 +223,7 @@ module Repp
params.require(:domain).permit(:name, :registrant, :period, :period_unit, :registrar,
:transfer_code, :reserved_pw,
dnskeys_attributes: [%i[flags alg protocol public_key]],
nameservers_attributes: [[:hostname, ipv4: [], ipv6: []]],
nameservers_attributes: [[:hostname, { ipv4: [], ipv6: [] }]],
admin_contacts: [], tech_contacts: [])
end
end