Fixed updateding device logging.

This commit is contained in:
Martin Edenhofer 2015-08-17 17:26:13 +02:00
parent 4b43ac7338
commit 06f02b2298

View file

@ -105,7 +105,7 @@ class ApplicationController < ActionController::Base
return if request.method == 'GET' || request.method == 'OPTIONS' return if request.method == 'GET' || request.method == 'OPTIONS'
# only update if needed # only update if needed
return if session[:check_user_device_at] && session[:check_user_device_at] < Time.zone.now - 5.minutes return if session[:check_user_device_at] && session[:check_user_device_at] > Time.zone.now - 5.minutes
session[:check_user_device_at] = Time.zone.now session[:check_user_device_at] = Time.zone.now
UserDevice.add( UserDevice.add(