mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 07:26:22 +02:00
Fixed codeclimate issues
This commit is contained in:
parent
97c11f5dfd
commit
537315a8a9
2 changed files with 3 additions and 3 deletions
|
@ -17,13 +17,13 @@ module WhiteIp::WhiteIpConcern
|
||||||
end
|
end
|
||||||
|
|
||||||
def select_ipv4(ip)
|
def select_ipv4(ip)
|
||||||
return [] unless check_ip4(ip).present?
|
return [] if check_ip4(ip).blank?
|
||||||
|
|
||||||
select { |white_ip| check_ip4(white_ip.ipv4) == check_ip4(ip) }
|
select { |white_ip| check_ip4(white_ip.ipv4) == check_ip4(ip) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def select_ipv6(ip)
|
def select_ipv6(ip)
|
||||||
return [] unless check_ip6(ip).present?
|
return [] if check_ip6(ip).blank?
|
||||||
|
|
||||||
select { |white_ip| check_ip6(white_ip.ipv6) == check_ip6(ip) }
|
select { |white_ip| check_ip6(white_ip.ipv6) == check_ip6(ip) }
|
||||||
end
|
end
|
||||||
|
|
|
@ -82,7 +82,7 @@ class WhiteIp < ApplicationRecord
|
||||||
ipv4, ipv6,
|
ipv4, ipv6,
|
||||||
interfaces.join(', ').upcase,
|
interfaces.join(', ').upcase,
|
||||||
created_at,
|
created_at,
|
||||||
updated_at,
|
updated_at
|
||||||
]
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue