From: John Dong Date: Fri, 31 Aug 2007 16:33:37 +0000 (-0400) Subject: Fix host truncation to work correctly X-Git-Url: https://projects.mako.cc/source/selectricity-live/commitdiff_plain/c124da51136711bb57d3d8ca57ba00b7af0a1e64?ds=inline;hp=--cc Fix host truncation to work correctly --- c124da51136711bb57d3d8ca57ba00b7af0a1e64 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 %>