Class: EffortLogMailer

Inherits:
ActionMailer::Base
  • Object
show all
Defined in:
app/mailers/effort_log_mailer.rb

Instance Method Summary collapse

Instance Method Details

#endweek_admin_report(course_id, course_name, faculty_emails) ⇒ Object


14
15
16
17
18
19
# File 'app/mailers/effort_log_mailer.rb', line 14

def endweek_admin_report(course_id, course_name, faculty_emails)
  @course_id = course_id
  @course_name = course_name

  mail(:to => faculty_emails, :subject => "Effort log data updated for #{course_name}", :date => Time.now)
end

#midweek_warning(saying, user) ⇒ Object


6
7
8
9
10
11
12
# File 'app/mailers/effort_log_mailer.rb', line 6

def midweek_warning(saying, user)
  @user = user
  email_with_name = @user.human_name + ' <' + @user.email + '>'
  attachments["ScottyDogLandscape.jpg"] = Rails.application.assets.find_asset('ScottyDogLandscape.jpg')
  mail(:to => @user.email, :subject => "Scotty Dog says: #{saying}", :date => Time.now)

end