diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb deleted file mode 100644 index 6880b58..0000000 --- a/app/controllers/sessions_controller.rb +++ /dev/null @@ -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 \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index 0df64de..9f519cc 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -1,10 +1,6 @@ Rails.application.routes.draw do -# root to: redirect { |path_params| "/leipzig" } - + root :to => 'search#index', as: :search post '/import' => 'import#new_papers_callback' - get '/' => 'search#index', as: :search - - resource :session, only: [:create, :destroy] # Example of regular route: # get 'products/:id' => 'catalog#view'