Module: ExportFile

Extended by:
ActiveSupport::Concern
Included in:
UserExportFile
Defined in:
app/models/concerns/export_file.rb

Instance Method Summary collapse

Instance Method Details

#send_message(mailer) ⇒ Object

[View source]

10
11
12
13
14
15
16
17
18
# File 'app/models/concerns/export_file.rb', line 10

def send_message(mailer)
  sender = User.find(1)
  message = Message.create!(
    recipient: user.username,
    sender: sender,
    body: mailer.body.raw_source,
    subject: mailer.subject
  )
end