Move methods to private

This commit is contained in:
Eugene Burmakin 2026-01-04 12:43:59 +01:00
parent a4a4e5386e
commit c6d96f3df7

View file

@ -132,14 +132,6 @@ class Users::Digest < ApplicationRecord
(all_time_stats['total_distance'] || 0).to_i
end
def total_tracked_minutes
top_countries_by_time.sum { |country| country['minutes'].to_i }
end
def total_tracked_days
(total_tracked_minutes / 1440.0).round(1)
end
def untracked_days
days_in_year = Date.leap?(year) ? 366 : 365
[days_in_year - total_tracked_days, 0].max.round(1)
@ -164,4 +156,12 @@ class Users::Digest < ApplicationRecord
def generate_sharing_uuid
self.sharing_uuid ||= SecureRandom.uuid
end
def total_tracked_days
(total_tracked_minutes / 1440.0).round(1)
end
def total_tracked_minutes
top_countries_by_time.sum { |country| country['minutes'].to_i }
end
end