mirror of
https://github.com/CodeforLeipzig/stadtratmonitor.git
synced 2024-12-22 23:53:15 +01:00
/ as root
This commit is contained in:
parent
cc17cd5f16
commit
64d40a3e9c
2 changed files with 1 additions and 24 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
|
|
|
@ -1,10 +1,6 @@
|
||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
# root to: redirect { |path_params| "/leipzig" }
|
root :to => 'search#index', as: :search
|
||||||
|
|
||||||
post '/import' => 'import#new_papers_callback'
|
post '/import' => 'import#new_papers_callback'
|
||||||
get '/' => 'search#index', as: :search
|
|
||||||
|
|
||||||
resource :session, only: [:create, :destroy]
|
|
||||||
|
|
||||||
# Example of regular route:
|
# Example of regular route:
|
||||||
# get 'products/:id' => 'catalog#view'
|
# get 'products/:id' => 'catalog#view'
|
||||||
|
|
Loading…
Reference in a new issue