]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/preferences_controller.rb
Merge remote-tracking branch 'upstream/pull/4728'
[rails.git] / app / controllers / preferences_controller.rb
index 6839bf37a8058302907fb700a832ad293f406854..dcf0d8b64e2682364b7c5b489ad1c9c72662bd19 100644 (file)
@@ -22,10 +22,11 @@ class PreferencesController < ApplicationController
                                       params[:user][:preferred_editor]
                                     end
     if current_user.save
-      flash[:notice] = t ".success"
+      # Use a partial so that it is rendered during the next page load in the correct language.
+      flash[:notice] = { :partial => "preferences/update_success_flash" }
       redirect_to preferences_path
     else
-      flash[:error] = t ".failure"
+      flash.now[:error] = t ".failure"
       render :edit
     end
   end