Class: Credible::InvitationMailer

Inherits:
MailerBase
  • Object
show all
Defined in:
app/mailers/credible/invitation_mailer.rb

Instance Method Summary collapse

Instance Method Details

#invitation_emailObject



2
3
4
5
6
7
8
# File 'app/mailers/credible/invitation_mailer.rb', line 2

def invitation_email
  @app_name = params[:app_name] || Rails.application.class.module_parent_name
  @user = params[:user]
  # TODO: Provide a means to have URL set by user
  @invitation_url = main_app.root_url + 'confirm/' + @user.confirmation_token + '?email=' + @user.email
  mail(to: @user.email, subject: "You have been invited to #{@app_name}")
end