Class: Elabs::Report

Inherits:
ApplicationRecord show all
Defined in:
app/models/elabs/report.rb

Instance Attribute Summary

Attributes inherited from ApplicationRecord

#changed_by

Instance Method Summary collapse

Instance Method Details

#notify_adminsObject

[View source]

14
15
16
17
18
19
20
# File 'app/models/elabs/report.rb', line 14

def notify_admins
  User.admins.each do |admin|
    Elabs::Notification.create! content: self,
                                event:   :report,
                                user:    admin
  end
end