Class: CourseMailer

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

Instance Method Summary collapse

Instance Method Details

#configure_course_admin_email(course, options = {}) ⇒ Object


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

def configure_course_admin_email(course, options = {})
  @course = course

  mail(:to => options[:to] || "[email protected]",
       :subject => "Faculty has configured a course #{course.semester} #{course.year} #{course.name}",
       :date => Time.now)
end

#configure_course_faculty_email(course, options = {}) ⇒ Object


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

def configure_course_faculty_email(course, options = {})
  @course = course

  mail(:to => options[:to] || course.faculty.collect { |user| user.email },
       :subject => options[:subject] || "Please let us know about your course #{course.name} (#{course.semester} #{course.year})",
       :date => Time.now)
end