mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2025-04-20 07:11:33 +02:00
simplify routes
This commit is contained in:
parent
2934bea7db
commit
98f05ca746
4 changed files with 17 additions and 33 deletions
|
@ -1,19 +0,0 @@
|
|||
class SessionsController < ApplicationController
|
||||
def create
|
||||
if user = User.find_or_create_from_auth_hash(auth_hash)
|
||||
session[:user_id] = user.id
|
||||
end
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
def destroy
|
||||
reset_session
|
||||
redirect_to root_path
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def auth_hash
|
||||
request.env['omniauth.auth']
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue