diff options
author | Peter Kozak <spag@golwen.net> | 2013-05-31 14:35:18 +0200 |
---|---|---|
committer | Peter Kozak <spag@golwen.net> | 2013-05-31 14:35:18 +0200 |
commit | de6abb94d05f8c36a1d4efa371f34ad620f191c2 (patch) | |
tree | a38547123056d0dfbfabcafd7e7f12ac3bb0e881 /app/models/intruder.rb | |
parent | 71216fcf617cf522a1d1a17ec5baba5edd2c542d (diff) |
country added
Diffstat (limited to 'app/models/intruder.rb')
-rw-r--r-- | app/models/intruder.rb | 4 |
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 |