destroys manager and managed_user session
This commit is contained in:
@@ -10,9 +10,16 @@ class Management::SessionsController < ActionController::Base
|
||||
end
|
||||
end
|
||||
|
||||
def destroy
|
||||
destroy_session
|
||||
redirect_to root_path, notice: t("devise.sessions.signed_out")
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def destroy_session
|
||||
session["manager_id"] = nil
|
||||
session["managed_user_id"] = nil
|
||||
end
|
||||
|
||||
end
|
||||
@@ -184,7 +184,7 @@ Rails.application.routes.draw do
|
||||
|
||||
get 'sign_in', to: 'sessions#create'
|
||||
|
||||
resources :sessions, only: :create
|
||||
resource :session, only: [:create, :destroy]
|
||||
resources :proposals, only: [:index, :new, :create] do
|
||||
member do
|
||||
post :vote
|
||||
|
||||
Reference in New Issue
Block a user