continue to backport old code
This commit is contained in:
@@ -2,7 +2,7 @@ class ApplicationController < ActionController::Base
|
||||
around_action :switch_locale
|
||||
|
||||
def switch_locale(&action)
|
||||
locale = I18n.default_locale
|
||||
locale = I18n.locale_available?(request.headers['Locale']) ? request.headers['Locale'] : I18n.default_locale
|
||||
I18n.with_locale(locale, &action)
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user