Sha256: c28c4451edd55fa1b911d14305e9868cbcda736fc26dcc239b377c8cd0e2f5c7
Contents?: true
Size: 432 Bytes
Versions: 1
Compression:
Stored size: 432 Bytes
Contents
class SessionsController < ApplicationController def create user = User.from_omniauth env['omniauth.auth'] session[:user_id] = user.id redirect_to root_url, notice: 'Signed in successfully' end def failure redirect_to root_url, notice: 'Sign in failed' end def destroy session.delete(:user_id) redirect_to root_url, notice: 'Signed out successfully' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-slooob-1.0.0 | examples/rails_example/app/controllers/sessions_controller.rb |