Module: Effective::CrudController::Users
- Included in:
- Effective::CrudController
- Defined in:
- app/controllers/concerns/effective/crud_controller/users.rb
Instance Method Summary collapse
-
#impersonation_user ⇒ Object
If we’re impersonating, this is the original user.
Instance Method Details
#impersonation_user ⇒ Object
If we’re impersonating, this is the original user
6 7 8 9 10 11 |
# File 'app/controllers/concerns/effective/crud_controller/users.rb', line 6 def impersonation_user return unless current_user.present? return unless session[:impersonation_user_id].present? @impersonation_user ||= current_user.class.find(session[:impersonation_user_id]) end |