dawarich/app/models/concerns/point_validation.rb

14 lines
253 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2025-03-03 16:39:43 -05:00
module PointValidation
extend ActiveSupport::Concern
def point_exists?(params, user_id)
Point.where(
lonlat: params[:lonlat],
timestamp: params[:timestamp].to_i,
user_id:
2025-03-03 16:39:43 -05:00
).exists?
end
end