add creator_ip_addr field to user feedback

This commit is contained in:
Albert Yi
2018-11-29 16:51:46 -08:00
parent 0488a326fd
commit fe612908cd
3 changed files with 19 additions and 2 deletions

View File

@@ -31,6 +31,7 @@ module Moderator
add_row(sums, PostAppeal.where(creator_ip_addr: ip_addrs).group(:creator).count)
add_row(sums, PostFlag.where(creator_ip_addr: ip_addrs).group(:creator).count)
add_row(sums, Upload.where(uploader_ip_addr: ip_addrs).group(:uploader).count)
add_row(sums, UserFeedback.where(creator_ip_addr: ip_addrs).group(:creator).count)
add_row(sums, Hash[User.where(last_ip_addr: ip_addrs).collect { |user| [user, 1] }])
add_row_id(sums, PoolArchive.where(updater_ip_addr: ip_addrs).group(:updater_id).count) if PoolArchive.enabled?
@@ -60,6 +61,7 @@ module Moderator
add_row(sums, PostFlag.where(creator: users).group(:creator_ip_addr).count)
add_row(sums, Upload.where(uploader: users).group(:uploader_ip_addr).count)
add_row(sums, User.where(id: users).where.not(last_ip_addr: nil).group(:last_ip_addr).count)
add_row(sums, UserFeedback.where(creator_id: users).where.not(creator_ip_addr: nil).group(:creator_ip_addr).count)
sums
end