Sha256: 0131af3fcd9b66b44091f6c3fc0e6a54c5dff55e97fef711aa34e1234eebd5a6
Contents?: true
Size: 1.1 KB
Versions: 1
Compression:
Stored size: 1.1 KB
Contents
class UserMailer < ActionMailer::Base default :from => ErpTechSvcs::Config.email_notifications_from def activation_needed_email(user, dba_organization=nil) @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, dba_organization=nil) @user = user @reset_password_token = @user.reset_password_token @url = "#{get_domain(user.instance_attributes[:domain])}#{@user.instance_attributes[:reset_password_url]}?token=#{@reset_password_token}" mail(:to => user.email, :subject => "Your password has been reset") end def get_domain(domain) domain = domain || ErpTechSvcs::Config.installation_domain "#{ErpTechSvcs::Config.file_protocol}://#{domain}" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
erp_tech_svcs-4.2.0 | app/mailers/user_mailer.rb |