]> cat aescling's git repositories - mastodon.git/commitdiff
Fix locale bug when change it on preferences (#3223) (#3232)
authorTomonori Murakami <crosslife777@gmail.com>
Mon, 22 May 2017 15:58:41 +0000 (00:58 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Mon, 22 May 2017 15:58:41 +0000 (17:58 +0200)
app/controllers/settings/preferences_controller.rb

index 28757d1bcfa2a764a203195456ac351883eb1d07..3dc3013c352bc5f1bd90c127a597c0f6efd73763 100644 (file)
@@ -11,6 +11,7 @@ class Settings::PreferencesController < ApplicationController
     user_settings.update(user_settings_params.to_h)
 
     if current_user.update(user_params)
+      I18n.locale = current_user.locale
       redirect_to settings_preferences_path, notice: I18n.t('generic.changes_saved_msg')
     else
       render :show