1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00
2016-03-23 18:39:41 +01:00

16 lines
394 B
Ruby

class Abuse < ActiveRecord::Base
include NotifyWith::NotificationAttachedObject
belongs_to :signaled, polymorphic: true
after_create :notify_admins_abuse_reported
private
def notify_admins_abuse_reported
NotificationCenter.call type: 'notify_admin_abuse_reported',
receiver: User.admins,
attached_object: self
end
end