Skip to content

Commit

Permalink
Fixed codeclimate issues
Browse files Browse the repository at this point in the history
  • Loading branch information
maricavor committed Sep 8, 2022
1 parent a3811ab commit 35ad836
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/controllers/domains_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -187,13 +187,13 @@ def domain_payload
# rubocop:enable Metrics/MethodLength

def contacts_attributes(domain_params)
return [] unless domain_params[:contacts_attributes].present?
return [] if domain_params[:contacts_attributes].blank?

domain_params[:contacts_attributes].values.reject { |c| c[:code].blank? }
end

def nameservers_attributes(domain_params)
return [] unless domain_params[:nameservers_attributes].present?
return [] if domain_params[:nameservers_attributes].blank?

domain_params[:nameservers_attributes].values.reject { |n| n[:hostname].blank? }
.map do |ns_attr|
Expand All @@ -206,7 +206,7 @@ def nameservers_attributes(domain_params)
end

def dnskeys_attributes(domain_params)
return [] unless domain_params[:dnskeys_attributes].present?
return [] if domain_params[:dnskeys_attributes].blank?

domain_params[:dnskeys_attributes].values.reject { |d| d[:public_key].blank? }
end
Expand Down

0 comments on commit 35ad836

Please sign in to comment.