mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-20 07:56:09 +01:00
fix failing tests and small refactorings
This commit is contained in:
parent
e8c3ba2e28
commit
4e29bf69f7
8 changed files with 53 additions and 376 deletions
|
|
@ -27,7 +27,11 @@ class TodosController < ApplicationController
|
|||
@not_done_todos = @not_done_todos.
|
||||
reorder("todos.due IS NULL, todos.due ASC, todos.created_at ASC").
|
||||
includes(Todo::DEFAULT_INCLUDES)
|
||||
@not_done_todos = @not_done_todos.limit(sanitize(params[:limit])) if params[:limit]
|
||||
|
||||
if params[:limit]
|
||||
@not_done_todos = @not_done_todos.limit(sanitize(params[:limit]))
|
||||
@todos = @todos.limit(sanitize(params[:limit]))
|
||||
end
|
||||
|
||||
if params[:due]
|
||||
due_within_when = Time.zone.now + params['due'].to_i.days
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue