From a1e2706c2f607c4cd7103e4d0263a3d5f08f3fb1 Mon Sep 17 00:00:00 2001 From: Manoj Date: Wed, 6 Nov 2013 01:05:28 +0530 Subject: [PATCH] Relation#all deprecation warning fix for Rails 4 --- lib/user_destroyer.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/user_destroyer.rb b/lib/user_destroyer.rb index dcc2bb0bd..1df59eef4 100644 --- a/lib/user_destroyer.rb +++ b/lib/user_destroyer.rb @@ -44,7 +44,7 @@ class UserDestroyer Post.with_deleted.where(user_id: user.id).update_all("user_id = NULL") # If this user created categories, fix those up: - categories = Category.where(user_id: user.id).all + categories = Category.where(user_id: user.id) categories.each do |c| c.user_id = Discourse.system_user.id c.save! @@ -63,4 +63,4 @@ class UserDestroyer end end -end \ No newline at end of file +end