Sha256: 534c1868f15412bf688a3a9294e93386ebd0ec6d9c02fc06d7d71fac1f463872
Contents?: true
Size: 655 Bytes
Versions: 37
Compression:
Stored size: 655 Bytes
Contents
module MyForum class UserMailer < ApplicationMailer def reset_password_email(user) @user = user o = [('a'..'z'), ('A'..'Z')].map { |i| i.to_a }.flatten @new_password = (0...10).map { o[rand(o.length)] }.join @user.password = @new_password @user.save mail(to: @user.email, subject: 'vaz.od.ua - New password') end def custom_email(email:, subject:, message:) @message = message mail(to: email, subject: subject) end def pm_notification(user, sender) @sender = sender mail(to: user.email, subject: I18n.t('my_forum.mailer.new_pm_notification_subject')) end end end
Version data entries
37 entries across 37 versions & 1 rubygems