Fix for geolocation

This commit is contained in:
Godwin
2016-07-10 18:52:36 -07:00
parent c56ecc0c7f
commit 87ff896c42
4 changed files with 7 additions and 5 deletions
+1 -1
View File
@@ -558,7 +558,7 @@ class ConferencesController < ApplicationController
@errors[:name] = :empty
end
if params[:location].present? && params[:location].gsub(/[\s\W]/, '').present? && (l = Geocoder.search(params[:location])).present?
if params[:location].present? && params[:location].gsub(/[\s\W]/, '').present? && (l = Geocoder.search(params[:location], params: { language: 'en' })).present?
corrected = view_context.location(l.first)
if corrected.present?