X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/6c2093b29d74b145b85e61c4fff09b5f13afa0e5..083500f056f5b995f1979f88b37793046d9e4d37:/app/models/trace.rb diff --git a/app/models/trace.rb b/app/models/trace.rb index 91492404b..5096a81aa 100644 --- a/app/models/trace.rb +++ b/app/models/trace.rb @@ -306,7 +306,7 @@ class Trace < ActiveRecord::Base tp.save! end - if gpx.actual_points > 0 + if gpx.actual_points.positive? max_lat = Tracepoint.where(:gpx_id => id).maximum(:latitude) min_lat = Tracepoint.where(:gpx_id => id).minimum(:latitude) max_lon = Tracepoint.where(:gpx_id => id).maximum(:longitude)