More code climate style fixes

This commit is contained in:
Jyri-Petteri Paloposki 2020-10-10 13:58:13 +03:00
parent d8acf60049
commit 67a426a2e9
28 changed files with 157 additions and 172 deletions

View file

@ -14,8 +14,8 @@ module Todos
not_done_todos = current_user.todos.active.not_hidden
end
not_done_todos = not_done_todos.
reorder(Arel.sql("todos.due IS NULL, todos.due ASC, todos.created_at ASC"))
not_done_todos = not_done_todos
.reorder(Arel.sql("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]