app/models/courses_users.rb
def email(pw, home_page)
    user = User.find(self.user_id)
    course = Course.find(self.course_id)
    Mailer.sync_message(
      recipients: user.email,
       subject: "You have been registered as a participant in #{course.title}",
       body: {
         home_page: home_page,
         user_name: ApplicationHelper.get_user_first_name(user),
         name: user.name,
         password: pw,
         partial_name: "register"
       }
    ).deliver
  end
# provide import functionality for Course Users
# if user does not exist, it will be created and added to this course
provide import functionality for Course Users
if user does not exist, it will be created and added to this course
provide import functionality for Course Users if user does not exist it will be created and added to this course
def email(pw, home_page)
    user = User.find(self.user_id)
    course = Course.find(self.course_id)
    Mailer.sync_message(
      recipients: user.email,
       subject: "You have been registered as a participant in #{course.title}",
       body: {
         home_page: home_page,
         user_name: ApplicationHelper.get_user_first_name(user),
         name: user.name,
         password: pw,
         partial_name: "register"
       }
    ).deliver
  end
def email ( pw , home_page ) user = User . find ( self . user_id ) course = Course . find ( self . course_id ) Mailer . sync_message ( recipients : user . email , subject : "You have been registered as a participant in #{course.title}" , body : { home_page : home_page , user_name : ApplicationHelper . get_user_first_name ( user ) , name : user . name , password : pw , partial_name : "register" } ) . deliver end
provide import functionality for Course Users
if user does not exist, it will be created and added to this course
provide import functionality for Course Users if user does not exist it will be created and added to this course
pw
home_page