Browse Source

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

Martin Edenhofer 8 years ago
parent
commit
eb8144b28b
1 changed files with 2 additions and 1 deletions
  1. 2 1
      app/controllers/user_devices_controller.rb

+ 2 - 1
app/controllers/user_devices_controller.rb

@@ -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