Class: Userswitch::SwitchController

Inherits:
ApplicationController
  • Object
show all
Includes:
Devise::Controllers::Helpers
Defined in:
app/controllers/userswitch/switch_controller.rb

Instance Method Summary collapse

Instance Method Details

#switch_userObject



6
7
8
9
10
# File 'app/controllers/userswitch/switch_controller.rb', line 6

def switch_user
  sign_out
  (params[:role].constantize.find(params[:id]))
  redirect_to :back
end