Class: Admin::UsersController
- Inherits:
-
AdminController
- Object
- ApplicationController
- AdminController
- Admin::UsersController
- Defined in:
- lib/voyage/templates/admin_users_controller.rb
Instance Method Summary collapse
Instance Method Details
#impersonate ⇒ Object
12 13 14 15 16 17 |
# File 'lib/voyage/templates/admin_users_controller.rb', line 12 def impersonate user = User.find(params[:id]) track_impersonation(user, 'Start') impersonate_user(user) redirect_to root_path end |
#index ⇒ Object
6 7 8 9 10 |
# File 'lib/voyage/templates/admin_users_controller.rb', line 6 def index @users = User.all respond_with(@users) end |
#stop_impersonating ⇒ Object
19 20 21 22 23 |
# File 'lib/voyage/templates/admin_users_controller.rb', line 19 def stop_impersonating track_impersonation(current_user, 'Stop') stop_impersonating_user redirect_to admin_users_path end |