Class: Userswitch::SwitchController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Userswitch::SwitchController
- Includes:
- Devise::Controllers::Helpers
- Defined in:
- app/controllers/userswitch/switch_controller.rb
Instance Method Summary collapse
Instance Method Details
#switch_user ⇒ Object
6 7 8 9 10 |
# File 'app/controllers/userswitch/switch_controller.rb', line 6 def switch_user sign_out sign_in(params[:role].constantize.find(params[:id])) redirect_to :back end |