From f512e6b7da8469ce4feb1e0de53e49bb24df7173 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Wed, 4 Jan 2017 12:16:02 +0200 Subject: [PATCH] Disable session timeout in dev env #15 --- app/controllers/application_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 839f6a9..0ce6512 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -18,6 +18,8 @@ class ApplicationController < ActionController::Base def authenticate_user redirect_to main_app.login_url and return unless depp_current_user && session[:last_seen] + return if Rails.env.development? + if (session[:last_seen].to_i + ENV['session_timeout'].to_i) < Time.now.to_i session_timeout else