dawarich/app/controllers/points_controller.rb

10 lines
197 B
Ruby
Raw Normal View History

2024-03-15 18:27:31 -04:00
class PointsController < ApplicationController
before_action :authenticate_user!
2024-03-15 18:27:31 -04:00
def index
2024-03-15 19:28:49 -04:00
@points = Point.all
2024-03-15 18:27:31 -04:00
@coordinates = @points.as_json(only: [:latitude, :longitude])
end
end