mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 19:00:32 -06:00
Relation#all deprecation warning fix for Rails 4
This commit is contained in:
parent
bba5631923
commit
a1e2706c2f
@ -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
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user