dawarich/app/controllers/points_controller.rb
2024-03-16 01:07:20 +01:00

9 lines
237 B
Ruby

class PointsController < ApplicationController
before_action :authenticate_user!
def index
@points = Point.all.order(timestamp: :asc)
@coordinates = @points.pluck(:latitude, :longitude).map { [_1.to_f, _2.to_f] }
end
end