]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/user_controller.rb
fix rubocop warnings
[rails.git] / app / controllers / user_controller.rb
index 9413ec6edaf23ac5045a8b1d6f492ff11377f9d4..d250cf21c457a0687e0d2b58c7bf311b7194f474 100644 (file)
@@ -349,9 +349,13 @@ class UserController < ApplicationController
         @user.email = @user.new_email
         @user.new_email = nil
         @user.email_valid = true
-        changed = gravatar_enable(@user)
+        gravatar_enabled = gravatar_enable(@user)
         if @user.save
-          flash[:notice] = (t "user.confirm_email.success") + (changed ? " " + gravatar_status_message(@user) : "")
+          flash[:notice] = if gravatar_enabled
+                             t("user.confirm_email.success") + " " + gravatar_status_message(@user)
+                           else
+                             t("user.confirm_email.success")
+                           end
         else
           flash[:errors] = @user.errors
         end