From 9985390c93052291e5b69408064bb4ff9893fa24 Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Wed, 19 Aug 2015 01:05:59 +0200 Subject: [PATCH] Small improvement for displaying city. --- app/controllers/user_devices_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/user_devices_controller.rb b/app/controllers/user_devices_controller.rb index c5b0a90bc..ddebe95fc 100644 --- a/app/controllers/user_devices_controller.rb +++ b/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')