From f87f25cad8a4ccab9559e8ca130479e1a6cb5381 Mon Sep 17 00:00:00 2001 From: Jens Ulferts Date: Wed, 21 Sep 2016 12:07:41 +0200 Subject: [PATCH] replace deprecated delete_all --- app/models/cost_query.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/cost_query.rb b/app/models/cost_query.rb index c872994005..eb663dfd67 100644 --- a/app/models/cost_query.rb +++ b/app/models/cost_query.rb @@ -21,7 +21,7 @@ class CostQuery < Report def_delegators :result, :real_costs User.before_destroy do |user| - CostQuery.delete_all ['user_id = ? AND is_public = ?', user.id, false] + CostQuery.where(user_id: user.id, is_public: false).delete_all CostQuery.where(['user_id = ?', user.id]).update_all ['user_id = ?', DeletedUser.first.id] max_query_id = 0