From c124da51136711bb57d3d8ca57ba00b7af0a1e64 Mon Sep 17 00:00:00 2001 From: John Dong Date: Fri, 31 Aug 2007 12:33:37 -0400 Subject: [PATCH] Fix host truncation to work correctly --- app/views/quickvote/list_voters.rhtml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/quickvote/list_voters.rhtml b/app/views/quickvote/list_voters.rhtml index 4d8e538..cdfc049 100644 --- a/app/views/quickvote/list_voters.rhtml +++ b/app/views/quickvote/list_voters.rhtml @@ -38,7 +38,7 @@ end %> - <%=h((w.host == nil or w.host.empty?) ? voter.ipaddress : w.host[-30..-1])%> + <%=h((w.host == nil or w.host.empty?) ? voter.ipaddress : w.host.reverse.slice(0,30).reverse)%> <%org=(w.all.grep(/^(OrgName|org-name)/)[0] or "").sub(/^(OrgName|org-name)\:/,'').strip+" - "+ (w.all.grep(/^(NetName|netname)/)[0] or "").sub(/^(NetName|netname)\:/,'').strip %> -- 2.30.2