mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-24 11:10:12 +01:00
fix test regression
This commit is contained in:
parent
bafd55cf09
commit
8ea417c792
2 changed files with 3 additions and 5 deletions
|
|
@ -8,7 +8,7 @@ module DueDateHelper
|
|||
|
||||
def initialize(date, prefs)
|
||||
@due = date
|
||||
@days = date.nil? ? nil : days_from_today(date)
|
||||
@days = date.nil? ? nil : self.class.days_from_today(date)
|
||||
@prefs = prefs
|
||||
end
|
||||
|
||||
|
|
@ -62,9 +62,7 @@ module DueDateHelper
|
|||
}
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def days_from_today(date)
|
||||
def self.days_from_today(date)
|
||||
(date.in_time_zone.to_date - Date.current).to_i
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -361,7 +361,7 @@ module TodosHelper
|
|||
def show_date(d)
|
||||
return "" if d == nil
|
||||
|
||||
days = days_from_today(d)
|
||||
days = DueDateHelper::DueDateView.days_from_today(d)
|
||||
|
||||
case days
|
||||
# overdue or due very soon! sound the alarm!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue