Fixed merge conflicts

This commit is contained in:
Godwin
2014-07-18 20:35:15 -06:00
parent 21ec7bb82a
commit 1efe20fe42
41 changed files with 1185 additions and 105 deletions
+13
View File
@@ -431,6 +431,14 @@ module ApplicationHelper
_(*a)
end
def lookup_ip
if request.remote_ip == '127.0.0.1'
session['remote_ip'] || (session['remote_ip'] = open("http://checkip.dyndns.org").first.gsub(/^.*\s([\d\.]+).*$/s, '\1').gsub(/[^\.\d]/, ''))
else
request.remote_ip
end
end
def lookup_ip_location
if request.remote_ip == '127.0.0.1'
Geocoder.search(session['remote_ip'] || (session['remote_ip'] = open("http://checkip.dyndns.org").first.gsub(/^.*\s([\d\.]+).*$/s, '\1').gsub(/[^\.\d]/, ''))).first
@@ -492,6 +500,11 @@ module ApplicationHelper
subdomain == 'test'
end
def location(location)
territory = Carmen::Country.coded(location.country).subregions.coded(location.territory)
location.city + (territory ? ' ' + territory.name : '') + ', ' + Carmen::Country.coded(location.country).name
end
private
def _form_field(type, name, value, options)
if type == 'check_box'