Pluck country name instead of country

This commit is contained in:
Eugene Burmakin 2025-08-01 18:42:53 +02:00
parent 5224daeddc
commit 559e7c2951

View file

@ -21,7 +21,7 @@ class MapController < ApplicationController
end
def build_coordinates
@points.pluck(:lonlat, :battery, :altitude, :timestamp, :velocity, :id, :country, :track_id)
@points.pluck(:lonlat, :battery, :altitude, :timestamp, :velocity, :id, :country_name, :track_id)
.map { |lonlat, *rest| [lonlat.y, lonlat.x, *rest.map(&:to_s)] }
end