Browse Source

Small improvement for displaying city.

Martin Edenhofer 9 years ago
parent
commit
9985390c93
1 changed files with 1 additions and 1 deletions
  1. 1 1
      app/controllers/user_devices_controller.rb

+ 1 - 1
app/controllers/user_devices_controller.rb

@@ -8,7 +8,7 @@ class UserDevicesController < ApplicationController
     devices_full = []
     devices.each {|device|
       attributes = device.attributes
-      if device.location_details['city_name']
+      if device.location_details['city_name'] && !device.location_details['city_name'].empty?
         attributes['location'] += ", #{device.location_details['city_name']}"
       end
       attributes.delete('created_at')