Class: UserSwitch::UserSwitchController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- UserSwitch::UserSwitchController
- Defined in:
- app/controllers/user_switch/user_switch_controller.rb
Instance Method Summary collapse
Instance Method Details
#switch ⇒ Object
3 4 5 6 7 8 |
# File 'app/controllers/user_switch/user_switch_controller.rb', line 3 def switch sign_out params[:scope] sign_in (params[:scope].camelize.constantize).find(params[:resource_id]) redirect_to request.referer end |