X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/baf10cd39289cd7e94a819305e46f43e85a136c6..5cbd4038edb32b0304bd766e70fc680ea447b52b:/app/controllers/site_controller.rb diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index a133e7b27..01cdcf23f 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -11,7 +11,7 @@ class SiteController < ApplicationController def index unless STATUS == :database_readonly || STATUS == :database_offline - session[:location] ||= OSM::IPLocation(request.env['REMOTE_ADDR']) + session[:location] ||= OSM.ip_location(request.env['REMOTE_ADDR']) end end @@ -47,10 +47,7 @@ class SiteController < ApplicationController end new_params[:anchor] = "map=#{zoom}/#{lat}/#{lon}" - - if params.key? :layers - new_params[:anchor] += "&layers=#{params[:layers]}" - end + new_params[:anchor] += "&layers=#{params[:layers]}" if params.key? :layers redirect_to Hash[new_params] end