From 9803ccc6a8df41f53be32a0b2be9a7ea27fc2bb0 Mon Sep 17 00:00:00 2001 From: Eugene Burmakin Date: Tue, 22 Jul 2025 22:44:41 +0200 Subject: [PATCH] Remove unused method --- app/models/stat.rb | 7 ------- app/services/stats/calculate_month.rb | 1 + 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/app/models/stat.rb b/app/models/stat.rb index e291a71a..f11e29d2 100644 --- a/app/models/stat.rb +++ b/app/models/stat.rb @@ -39,11 +39,4 @@ class Stat < ApplicationRecord def calculate_daily_distances(monthly_points) Stats::DailyDistanceQuery.new(monthly_points, timespan).call end - - def filter_points_for_day(points, day) - beginning_of_day = day.beginning_of_day.to_i - end_of_day = day.end_of_day.to_i - - points.select { |p| p.timestamp.between?(beginning_of_day, end_of_day) } - end end diff --git a/app/services/stats/calculate_month.rb b/app/services/stats/calculate_month.rb index e996ac4f..839ea55a 100644 --- a/app/services/stats/calculate_month.rb +++ b/app/services/stats/calculate_month.rb @@ -65,6 +65,7 @@ class Stats::CalculateMonth .where(timestamp: start_timestamp..end_timestamp) .select(:city, :country) .distinct + CountriesAndCities.new(toponym_points).call end