Sha256: e6b6fdf801b5339bdf5d3c1a1271301b5618121aeb27d86d09c455f5ba8422f0

Contents?: true

Size: 815 Bytes

Versions: 10

Compression:

Stored size: 815 Bytes

Contents

class UserMailer < ActionMailer::Base
  def signup_notification(user, activation_url)
    setup_email(user)
    @body[:user] = user
    @subject    += 'Please activate your new account'
    @body[:url]  = activation_url
  end
  
  def activation(user, home_url)
    setup_email(user)
    @body[:user] = user
    @subject    += 'Your account has been activated!'
    @body[:url]  = home_url
  end

  def recap(users, subject, content, home_url)
    setup_email(users[0])
    @recipients = ADMIN_EMAIL
    @bcc = users.map{|u| u.email}
    @subject << subject
    @body[:content] = content
    @body[:url] = home_url
  end
  
  protected
    def setup_email(user)
      @recipients  = user.email
      @from        = ADMIN_EMAIL
      @subject     = "[#{TOURNAMENT_TITLE}] "
      @sent_on     = Time.now
    end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
tournament-3.0.3 webgui/app/models/user_mailer.rb
tournament-3.0.2 webgui/app/models/user_mailer.rb
tournament-3.0.1 webgui/app/models/user_mailer.rb
tournament-3.0.0 webgui/app/models/user_mailer.rb
tournament-2.4.0 webgui/app/models/user_mailer.rb
tournament-2.5.0 webgui/app/models/user_mailer.rb
tournament-2.3.0 webgui/app/models/user_mailer.rb
tournament-2.5.2 webgui/app/models/user_mailer.rb
tournament-2.6.0 webgui/app/models/user_mailer.rb
tournament-2.5.1 webgui/app/models/user_mailer.rb