diff options
author | mhasbini <mohammad.hasbini@gmail.com> | 2017-04-02 20:48:58 +0300 |
---|---|---|
committer | mhasbini <mohammad.hasbini@gmail.com> | 2017-04-02 20:48:58 +0300 |
commit | 2332bf34ac417bb8a0aaba9482379bcfadb6d26e (patch) | |
tree | 5dfc88d99fa60499397337f9609642c03ebe4981 /app/services | |
parent | 9fc17f6f4abdb04f3cf1b60b87bd67b894a19c39 (diff) |
Remove unnecessary ORDER BY clause when updating todos
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/todo_service.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/todo_service.rb b/app/services/todo_service.rb index 2c56cb4c680..b6e88b0280f 100644 --- a/app/services/todo_service.rb +++ b/app/services/todo_service.rb @@ -204,7 +204,7 @@ class TodoService # Only update those that are not really on that state todos = todos.where.not(state: state) todos_ids = todos.pluck(:id) - todos.update_all(state: state) + todos.unscope(:order).update_all(state: state) current_user.update_todos_count_cache todos_ids end |