mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-15 03:38:08 +01:00
fix #1167
This commit is contained in:
parent
b3d92b9779
commit
4d46750f05
6 changed files with 14 additions and 3 deletions
|
|
@ -84,6 +84,12 @@ class LoginController < ApplicationController
|
|||
def expire_session
|
||||
# this is a hack to enable cucumber to expire a session by calling this
|
||||
# method. The method will be unavailable for production environment
|
||||
|
||||
@user.forget_me if logged_in?
|
||||
cookies.delete :auth_token
|
||||
session['user_id'] = nil
|
||||
reset_session
|
||||
|
||||
unless Rails.env.production?
|
||||
session['expiry_time'] = Time.now
|
||||
respond_to do |format|
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue