dmails: fix feedback not being left when spammer is autobanned.

This commit is contained in:
evazion
2019-08-22 21:20:51 -05:00
parent 4f5d80bb60
commit 6ba3d68792
2 changed files with 3 additions and 2 deletions

View File

@@ -89,7 +89,7 @@ class Ban < ApplicationRecord
end
def update_user_on_create
user.update_attribute(:is_banned, true)
user.update!(is_banned: true)
end
def update_user_on_destroy
@@ -122,7 +122,7 @@ class Ban < ApplicationRecord
end
def create_feedback
user.feedback.create(category: "negative", body: "Banned for #{humanized_duration}: #{reason}")
user.feedback.create!(creator: banner, category: "negative", body: "Banned for #{humanized_duration}: #{reason}")
end
def create_ban_mod_action