Small improvement for displaying city.

This commit is contained in:
Martin Edenhofer 2015-08-19 01:05:59 +02:00
parent c3eea0b8af
commit 9985390c93

View file

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