Explicitly check for different locale before updating
This commit is contained in:
@@ -54,9 +54,8 @@ class ApplicationController < ActionController::Base
|
|||||||
|
|
||||||
locale = session[:locale]
|
locale = session[:locale]
|
||||||
|
|
||||||
if current_user
|
if current_user && current_user.locale != locale.to_s
|
||||||
current_user.locale = locale
|
current_user.update(locale: locale)
|
||||||
current_user.save
|
|
||||||
end
|
end
|
||||||
|
|
||||||
I18n.locale = locale
|
I18n.locale = locale
|
||||||
|
|||||||
Reference in New Issue
Block a user