diff options
author | ysksn <bluewhale1982@gmail.com> | 2018-12-13 06:32:13 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-12-12 22:32:13 +0100 |
commit | b048926e678e5b642cb1e939f629236e77944523 (patch) | |
tree | 417254cdb17485eb37655b32d3d5ea477e8e8b2a /app/controllers/settings/two_factor_authentications_controller.rb | |
parent | 9983d21d35cad6ff1ad809baa7ae79dc430870f5 (diff) |
Create Settings::BaseController (#9507)
Define `Settings::BaseController#set_body_classes` so that sub classes inherit `Settings::BaseController` don't need to define `#set_body_classes` agein.
Diffstat (limited to 'app/controllers/settings/two_factor_authentications_controller.rb')
-rw-r--r-- | app/controllers/settings/two_factor_authentications_controller.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/controllers/settings/two_factor_authentications_controller.rb b/app/controllers/settings/two_factor_authentications_controller.rb index e4d8aed41..e12c43074 100644 --- a/app/controllers/settings/two_factor_authentications_controller.rb +++ b/app/controllers/settings/two_factor_authentications_controller.rb @@ -1,12 +1,11 @@ # frozen_string_literal: true module Settings - class TwoFactorAuthenticationsController < ApplicationController + class TwoFactorAuthenticationsController < BaseController layout 'admin' before_action :authenticate_user! before_action :verify_otp_required, only: [:create] - before_action :set_body_classes def show @confirmation = Form::TwoFactorConfirmation.new @@ -44,9 +43,5 @@ module Settings current_user.validate_and_consume_otp!(confirmation_params[:code]) || current_user.invalidate_otp_backup_code!(confirmation_params[:code]) end - - def set_body_classes - @body_classes = 'admin' - end end end |