Sha256: 5d912cd96336ff60aedef84ec9f015c6318b738b648a3caa67d267cb06d68d09

Contents?: true

Size: 1.06 KB

Versions: 12

Compression:

Stored size: 1.06 KB

Contents

class AuthNotifier < ActionMailer::Base 
  def account_activation(account, address=nil)
    if address.nil?
      address = account.person.primary_email_address
    elsif address.kind_of? EmailAddress
      address = address.address
    end
    
    @recipients = address
    @from = "noreply@#{default_url_options[:host]}"
    @subject = "Your account on #{default_url_options[:host]}"
    
    @body["name"] = account.person.name || "New User"
    @body["account"] = account
    @body["server_name"] = default_url_options[:host]
  end
  
  def generated_password(account, password, address=nil)
    if address.nil?
      address = account.person.primary_email_address
    elsif address.kind_of? EmailAddress
      address = address.address
    end
    
    @recipients = address
    @from = "noreply@#{default_url_options[:host]}"
    @subject = "Your password has been reset on #{default_url_options[:host]}"
    
    @body["name"] = account.person.name
    @body["account"] = account
    @body["server_name"] = default_url_options[:host]
    @body["password"] = password
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
ae_users_legacy-0.6.14 app/models/auth_notifier.rb
ae_users_legacy-0.6.13 app/models/auth_notifier.rb
ae_users_legacy-0.6.12 app/models/auth_notifier.rb
ae_users_legacy-0.6.11 app/models/auth_notifier.rb
ae_users_legacy-0.6.10 app/models/auth_notifier.rb
ae_users_legacy-0.6.9 app/models/auth_notifier.rb
ae_users_legacy-0.6.8 app/models/auth_notifier.rb
ae_users_legacy-0.6.7 app/models/auth_notifier.rb
ae_users_legacy-0.6.6 app/models/auth_notifier.rb
ae_users_legacy-0.6.5 app/models/auth_notifier.rb
ae_users_legacy-0.6.3 app/models/auth_notifier.rb
ae_users-0.6.0 app/models/auth_notifier.rb