mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 07:10:12 +01:00
fix deprecation warnings
This commit is contained in:
parent
b343d0a09e
commit
eaa66be698
19 changed files with 37 additions and 33 deletions
|
|
@ -6,7 +6,8 @@ class DoneTodos
|
|||
|
||||
def self.done_today(todos, includes = {:include => Todo::DEFAULT_INCLUDES})
|
||||
start_of_this_day = Time.zone.now.beginning_of_day
|
||||
todos.completed_after(start_of_this_day).all(includes)
|
||||
# TODO: refactor to remove outer hash from includes param
|
||||
todos.completed_after(start_of_this_day).includes(includes[:include])
|
||||
end
|
||||
|
||||
def self.done_rest_of_week(todos, includes = {:include => Todo::DEFAULT_INCLUDES})
|
||||
|
|
@ -37,6 +38,7 @@ class DoneTodos
|
|||
private
|
||||
|
||||
def self.done_between(todos, includes, start_date, end_date)
|
||||
todos.completed_before(start_date).completed_after(end_date).all(includes)
|
||||
# TODO: refactor to remove outer hash from includes param
|
||||
todos.completed_before(start_date).completed_after(end_date).includes(includes[:include])
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue