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



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

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