Sha256: ef37c1a969fac534b2b0a094e515a073fecd4d03c5dc04f4e3466b7903f4b3da

Contents?: true

Size: 902 Bytes

Versions: 21

Compression:

Stored size: 902 Bytes

Contents

class UserMailer < ApplicationMailer
  def password_reset
    @user = params[:user]
    @signed_id = @user.password_reset_tokens.create.signed_id(expires_in: 20.minutes)

    mail to: @user.email, subject: "Reset your password"
  end

  def email_verification
    @user = params[:user]
    @signed_id = @user.email_verification_tokens.create.signed_id(expires_in: 2.days)

    mail to: @user.email, subject: "Verify your email"
  end
  <%- if passwordless? %>
  def passwordless
    @user = params[:user]
    @signed_id = @user.sign_in_tokens.create.signed_id(expires_in: 1.day)

    mail to: @user.email, subject: "Your sign in link"
  end
  <%- end -%>
  <%- if invitable? %>
  def invitation_instructions
    @user = params[:user]
    @signed_id = @user.password_reset_tokens.create.signed_id(expires_in: 2.days)

    mail to: @user.email, subject: "Invitation instructions"
  end
  <%- end -%>
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
authentication-zero-2.16.36 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.35 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.34 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.33 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.32 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.31 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.30 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.29 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.28 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.27 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.26 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.25 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.24 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.23 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.22 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.21 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.20 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.19 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.18 lib/generators/authentication/templates/mailers/user_mailer.rb.tt
authentication-zero-2.16.17 lib/generators/authentication/templates/mailers/user_mailer.rb.tt