Class: UsersController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- UsersController
- Includes:
- Pundit
- Defined in:
- lib/kowl/templates/app/controllers/users_controller.rb
Instance Method Summary collapse
Instance Method Details
#impersonate ⇒ Object
6 7 8 9 10 11 |
# File 'lib/kowl/templates/app/controllers/users_controller.rb', line 6 def impersonate user = User.find(params[:id]) user impersonate_user(user) redirect_to root_path end |
#stop_impersonating ⇒ Object
13 14 15 16 |
# File 'lib/kowl/templates/app/controllers/users_controller.rb', line 13 def stop_impersonating stop_impersonating_user redirect_to(request.referer || root_path) end |