Prefer destroy! over destroy when not checking for return value.

This commit is contained in:
Guo Xiang Tan
2018-08-31 09:52:10 +08:00
parent 91e14226a5
commit 93a64c4aa1
+1 -1
View File
@@ -140,7 +140,7 @@ SQL
post_number: post.post_number
)
notification.destroy if notification
notification.destroy! if notification
DiscourseEvent.trigger(:unaccepted_solution, post)
end