diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 9c0d31434..5fdf1622e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -113,7 +113,10 @@ class ApplicationController < ActionController::Base end # check if entry exists / only if write action - return if request.method == 'GET' || request.method == 'OPTIONS' + method = request.method + return if method == 'GET' + return if method == 'OPTIONS' + return if method == 'HEAD' # only update if needed return if session[:user_device_update_at] && session[:user_device_update_at] > Time.zone.now - 5.minutes diff --git a/app/models/user_device.rb b/app/models/user_device.rb index b75be0c1d..9363a44eb 100644 --- a/app/models/user_device.rb +++ b/app/models/user_device.rb @@ -145,6 +145,7 @@ log user device action end # update attributes + user_device.updated_at = Time.zone.now # force update, also if no other attribute has changed user_device.save user_device end