mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 17:21:38 -05:00
Move methods to private
This commit is contained in:
parent
a4a4e5386e
commit
c6d96f3df7
1 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue