Sha256: a5420c4f61f7b5a5f86f0c3b752ca051dcdab75e0ba9b3c56ce29e581b20b09b
Contents?: true
Size: 565 Bytes
Versions: 1
Compression:
Stored size: 565 Bytes
Contents
class UserMailer < ApplicationMailer def password_reset @user = params[:user] @signed_id = @user.signed_id(purpose: :password_reset, expires_in: 20.minutes) mail to: @user.email, subject: "Reset your password" end def email_verification @user = params[:user] <%- if code_verifiable? -%> @user.verification_code.value = rand.to_s[2..7] <%- else -%> @signed_id = @user.signed_id(purpose: "email_verification/#{@user.email}", expires_in: 2.days) <%- end -%> mail to: @user.email, subject: "Verify your email" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
authentication-zero-2.12.6 | lib/generators/authentication/templates/mailers/user_mailer.rb.tt |