mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
11 lines
270 B
Ruby
11 lines
270 B
Ruby
# frozen_string_literal: true
|
|
|
|
class DataMigrations::SetPointsCountryIdsJob < ApplicationJob
|
|
queue_as :default
|
|
|
|
def perform(point_id)
|
|
point = Point.find(point_id)
|
|
point.country_id = Country.containing_point(point.lon, point.lat).id
|
|
point.save!
|
|
end
|
|
end
|