summaryrefslogtreecommitdiff
path: root/app/models/intruder.rb
diff options
context:
space:
mode:
authorPeter Kozak <spag@golwen.net>2013-05-31 14:35:18 +0200
committerPeter Kozak <spag@golwen.net>2013-05-31 14:35:18 +0200
commitde6abb94d05f8c36a1d4efa371f34ad620f191c2 (patch)
treea38547123056d0dfbfabcafd7e7f12ac3bb0e881 /app/models/intruder.rb
parent71216fcf617cf522a1d1a17ec5baba5edd2c542d (diff)
country added
Diffstat (limited to 'app/models/intruder.rb')
-rw-r--r--app/models/intruder.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/intruder.rb b/app/models/intruder.rb
index 9c01634..c305bd3 100644
--- a/app/models/intruder.rb
+++ b/app/models/intruder.rb
@@ -25,6 +25,10 @@ class Intruder < ActiveRecord::Base
key
end
+ def country
+ GeoIpCountry.find_by_ip(self.contact_ip)
+ end
+
def whois(ip_address = self.contact_ip)
if ! ip_address.blank?
begin