diff options
author | ysksn <bluewhale1982@gmail.com> | 2018-12-17 19:40:51 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2018-12-17 11:40:51 +0100 |
commit | 3281df0df1eb83e77d5c3028537be2669eebd69c (patch) | |
tree | 39b0282514b35cac3447177ce33aa4c3b6a9ed33 /app/controllers/admin/base_controller.rb | |
parent | 0c8071523592fc4ce73aa5c39822ca5d7f5f71d7 (diff) |
Move #set_user to Admin::BaseController (#9470)
* Move #set_user to Admin::BaseController * Rename Admin::TwoFactorAuthenticationsController from `#set_user` to `#set_target_user` .
Diffstat (limited to 'app/controllers/admin/base_controller.rb')
-rw-r--r-- | app/controllers/admin/base_controller.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/controllers/admin/base_controller.rb b/app/controllers/admin/base_controller.rb index 8593b582a..7b81a2b01 100644 --- a/app/controllers/admin/base_controller.rb +++ b/app/controllers/admin/base_controller.rb @@ -15,5 +15,9 @@ module Admin def set_body_classes @body_classes = 'admin' end + + def set_user + @user = Account.find(params[:account_id]).user || raise(ActiveRecord::RecordNotFound) + end end end |