Remove IpAddress model.

This commit is contained in:
evazion
2022-09-17 23:29:57 -05:00
parent 075199cd1e
commit 553d35178c
8 changed files with 12 additions and 68 deletions

View File

@@ -28,10 +28,10 @@
<tr>
<th>Proxy?</th>
<td><%= ip_address.ip_addr.is_proxy? ? "Yes" : "No" %></td>
<td><%= ip_address.is_proxy? ? "Yes" : "No" %></td>
</tr>
<% if ip_address.ip_addr.is_tor? %>
<% if ip_address.is_tor? %>
<tr>
<th>Tor?</th>
<td>Yes</td>
@@ -41,8 +41,8 @@
<tr>
<th>IP Banned?</th>
<td>
<% if IpBan.ip_matches(ip_address.ip_addr.to_s).exists? %>
Yes (<%= link_to "info", ip_bans_path(search: { ip_addr: ip_address.ip_addr.to_s }) %>)
<% if IpBan.ip_matches(ip_address.to_s).exists? %>
Yes (<%= link_to "info", ip_bans_path(search: { ip_addr: ip_address.to_s }) %>)
<% else %>
No
<% end %>
@@ -78,7 +78,7 @@
<th>Details</th>
<td>
<details>
<pre><%= JSON.pretty_generate(ip_address.lookup.response) %></pre>
<pre><%= JSON.pretty_generate(ip_address.ip_lookup.response) %></pre>
</details>
</td>
</tr>

View File

@@ -2,7 +2,7 @@
<div id="c-ip-addresses">
<div id="a-show">
<h1>IP Address: <%= @ip_address.ip_addr %></h1>
<h1>IP Address: <%= @ip_address %></h1>
<%= render "info", ip_address: @ip_address, ip_info: @ip_info %>
</div>