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

Version Path
my_forum-0.0.1.beta60 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta59 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta58 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta57 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta56 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta55 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta54 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta53 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta52 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta51 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta50 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta49 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta48 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta47 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta46 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta45 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta44 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta43 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta42 app/mailers/my_forum/user_mailer.rb
my_forum-0.0.1.beta41 app/mailers/my_forum/user_mailer.rb