Code style fixes

This commit is contained in:
Jyri-Petteri Paloposki 2020-10-10 02:27:42 +03:00
parent c6bbc67dab
commit d8acf60049
72 changed files with 458 additions and 594 deletions

View file

@ -1,6 +1,5 @@
module Todos
class Calendar
attr_reader :user, :included_tables
def initialize(user)
@ -48,11 +47,10 @@ module Todos
@end_of_the_month ||= today.end_of_month
end
private
private
def actions
user.todos.not_completed.includes(included_tables).reorder("due")
end
end
end

View file

@ -15,8 +15,8 @@ module Todos
end
not_done_todos = not_done_todos.
reorder(Arel.sql("todos.due IS NULL, todos.due ASC, todos.created_at ASC")).
includes(Todo::DEFAULT_INCLUDES)
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]