X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/898c47e647fbffcd0543b78033945b04f1b9aeae..9a9e13af:/app/controllers/user_controller.rb diff --git a/app/controllers/user_controller.rb b/app/controllers/user_controller.rb index 94a3e1142..2e2571952 100644 --- a/app/controllers/user_controller.rb +++ b/app/controllers/user_controller.rb @@ -22,6 +22,9 @@ class UserController < ApplicationController @title = t 'user.new.title' @user = User.new(params[:user]) + country_code = params[:legale] || OSM.IPToCountry(request.remote_ip) + @text = OSM.legal_text_for_country(country_code) + if @user.invalid? render :action => 'new' end