Fixed current user selection of user devices to disable it in web interface.

This commit is contained in:
Martin Edenhofer 2016-08-18 07:26:07 +02:00
parent 3ea96e6f84
commit eb8144b28b

View file

@ -14,8 +14,9 @@ class UserDevicesController < ApplicationController
attributes.delete('created_at')
attributes.delete('device_details')
attributes.delete('location_details')
attributes.delete('fingerprint')
if session[:user_device_id] == device.id
if session[:user_device_fingerprint] == device.fingerprint
attributes['current'] = true
end
devices_full.push attributes