/users: fix exception when last_ip_addr is nil.
This commit is contained in:
@@ -17,9 +17,11 @@
|
|||||||
<% end %>
|
<% end %>
|
||||||
<% if policy(IpAddress).show? %>
|
<% if policy(IpAddress).show? %>
|
||||||
<% t.column "IP" do |user| %>
|
<% t.column "IP" do |user| %>
|
||||||
|
<% if user.last_ip_addr.present? %>
|
||||||
<%= link_to user.last_ip_addr, ip_address_path(user.last_ip_addr) %>
|
<%= link_to user.last_ip_addr, ip_address_path(user.last_ip_addr) %>
|
||||||
<% end %>
|
<% end %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
<% end %>
|
||||||
<% t.column "Posts" do |user| %>
|
<% t.column "Posts" do |user| %>
|
||||||
<%= link_to user.post_upload_count, posts_path(:tags => "user:#{user.name}") %>
|
<%= link_to user.post_upload_count, posts_path(:tags => "user:#{user.name}") %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|||||||
Reference in New Issue
Block a user