From 9945371a05492cbba215f4d251b08c1768c4221c Mon Sep 17 00:00:00 2001 From: Mini Robot Date: Fri, 1 Jun 2018 15:14:14 +0200 Subject: [PATCH] geolocation --- Gemfile | 1 + app/controllers/shop_controller.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/Gemfile b/Gemfile index 4c56d86..f36708e 100644 --- a/Gemfile +++ b/Gemfile @@ -68,3 +68,4 @@ end gem 'tzinfo-data', platforms: %i[mingw mswin x64_mingw jruby] gem 'kaminari', '1.1.1' +gem 'geocoder' diff --git a/app/controllers/shop_controller.rb b/app/controllers/shop_controller.rb index ebefeff..f87cfab 100644 --- a/app/controllers/shop_controller.rb +++ b/app/controllers/shop_controller.rb @@ -4,6 +4,7 @@ class ShopController < ApplicationController include PageContent def set_settings + Rails.logger.error request.location.country_code @ss = ScSetting.first redirect_to '/closed.html' if @ss.shop_active.eql?(false) end