Sha256: 8f9ef1d14d800590637b0f8c4f24d1cf642ca303eaa55a91ecda3ad9072717ec
Contents?: true
Size: 994 Bytes
Versions: 1
Compression:
Stored size: 994 Bytes
Contents
class UserMailer < ActionMailer::Base default :from => ErpTechSvcs::Config.email_notifications_from def activation_needed_email(user) @user = user @url = "#{get_domain(user.instance_attributes[:domain])}/users/activate/#{user.activation_token}" @url << "?login_url=#{@user.instance_attributes[:login_url]}" unless @user.instance_attributes[:login_url].nil? @temp_password = @user.instance_attributes[:temp_password] unless @user.instance_attributes[:temp_password].nil? mail(:to => user.email, :subject => "An account has been created and needs activation") end def reset_password_email(user) @user = user @url = "#{get_domain(user.instance_attributes[:domain])}#{@user.instance_attributes[:login_url]}" mail(:to => user.email, :subject => "Your password has been reset") end def get_domain(domain) domain = domain || ErpTechSvcs::Config.installation_domain domain = "http://#{domain}" if domain.index('http').nil? domain end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
erp_tech_svcs-4.0.0 | app/mailers/user_mailer.rb |