Skip to content

Remove default scope from todos

Sean McGivern requested to merge remove-default-scope-from-todos into master

Previously, sorting todos by priority would generate this sorting:

ORDER BY "projects"."id" DESC, highest_priority ASC NULLS LAST, todos.created_at

Now, it correctly generates:

ORDER BY highest_priority ASC NULLS LAST, todos.created_at, "todos"."id" DESC

I also removed the default scope entirely to avoid this mistake being possible in future.

Merge request reports