X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/d4130bcac83015564f0326457f2bb67d1b5ebab6..f249245135c8ed85562a89923da19564e644a32d:/app/controllers/users_controller.rb diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index aa9a4f02a..b3596b376 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -359,7 +359,7 @@ class UsersController < ApplicationController gravatar_enabled = gravatar_enable(current_user) if current_user.save flash[:notice] = if gravatar_enabled - t("users.confirm_email.success") + " " + gravatar_status_message(current_user) + "#{t('users.confirm_email.success')} #{gravatar_status_message(current_user)}" else t("users.confirm_email.success") end @@ -494,7 +494,7 @@ class UsersController < ApplicationController ## # omniauth failure callback def auth_failure - flash[:error] = t("users.auth_failure." + params[:message]) + flash[:error] = t("users.auth_failure.#{params[:message]}") redirect_to params[:origin] || login_url end @@ -524,7 +524,7 @@ class UsersController < ApplicationController if referer.nil? params[:origin] = request.path else - params[:origin] = request.path + "?referer=" + CGI.escape(referer) + params[:origin] = "#{request.path}?referer=#{CGI.escape(referer)}" params[:referer] = referer end @@ -616,13 +616,13 @@ class UsersController < ApplicationController user.languages = params[:user][:languages].split(",") case params[:avatar_action] - when "new" then + when "new" user.avatar.attach(params[:user][:avatar]) user.image_use_gravatar = false - when "delete" then + when "delete" user.avatar.purge_later user.image_use_gravatar = false - when "gravatar" then + when "gravatar" user.avatar.purge_later user.image_use_gravatar = true end