human? helper method on a user

This is cleaner than hard coding `id > 0` in ruby code.
This commit is contained in:
Robin Ward
2019-02-08 13:34:54 -05:00
parent fb18c57372
commit c719658f9f
5 changed files with 17 additions and 3 deletions

View File

@ -226,7 +226,7 @@ class PostDestroyer
end
def agree_with_flags
if @post.has_active_flag? && @user.id > 0 && @user.staff?
if @post.has_active_flag? && @user.human? && @user.staff?
Jobs.enqueue(
:send_system_message,
user_id: @post.user_id,