Class: SessionsController
- Inherits:
-
ApplicationController
- Object
- ActionController::API
- ApplicationController
- SessionsController
- Defined in:
- app/controllers/sessions_controller.rb
Instance Method Summary collapse
Instance Method Details
#create ⇒ Object
3 4 5 6 7 |
# File 'app/controllers/sessions_controller.rb', line 3 def create user = User.from_omniauth(request.env['omniauth.auth']) session[:user_id] = user.id redirect_to Config.ui_root_url end |
#destroy ⇒ Object
9 10 11 |
# File 'app/controllers/sessions_controller.rb', line 9 def destroy session[:user_id] = nil end |
#failure ⇒ Object
13 14 15 |
# File 'app/controllers/sessions_controller.rb', line 13 def failure redirect_to Config.ui_root_url, failed: true end |