diff options
author | Shel R <Yiskah.Raphen@gmail.com> | 2017-04-07 22:15:55 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-07 22:15:55 -0400 |
commit | 1b42f717f2c44bb0c85dfc8e8b40790b12d45993 (patch) | |
tree | 852b1ccaeb7c5eeae530c66eb1a97462b2dd7831 /app/controllers/oauth/authorizations_controller.rb | |
parent | eb98c99924ab810eea8a97040a82308f68c805cc (diff) | |
parent | 7004c692040d9372c187a13a21f1215f07d3a8ff (diff) |
Merge branch 'master' into master
Diffstat (limited to 'app/controllers/oauth/authorizations_controller.rb')
-rw-r--r-- | app/controllers/oauth/authorizations_controller.rb | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/app/controllers/oauth/authorizations_controller.rb b/app/controllers/oauth/authorizations_controller.rb index 7c25266d8..cdbfde0fb 100644 --- a/app/controllers/oauth/authorizations_controller.rb +++ b/app/controllers/oauth/authorizations_controller.rb @@ -1,9 +1,10 @@ # frozen_string_literal: true class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController + include Localized + skip_before_action :authenticate_resource_owner! - before_action :set_locale before_action :store_current_location before_action :authenticate_resource_owner! @@ -12,10 +13,4 @@ class Oauth::AuthorizationsController < Doorkeeper::AuthorizationsController def store_current_location store_location_for(:user, request.url) end - - def set_locale - I18n.locale = current_user.try(:locale) || I18n.default_locale - rescue I18n::InvalidLocale - I18n.locale = I18n.default_locale - end end |