Sha256: afd3365c86e9986ae516b854bb385a5c36cd9fb64888818697353eb0b249a669

Contents?: true

Size: 615 Bytes

Versions: 13

Compression:

Stored size: 615 Bytes

Contents

class MinimalistAuthenticationMailer < ApplicationMailer
  def verify_email(user)
    @verify_email_link = email_verification_url(token: user.verification_token)
    send_to(user, 'Email Address Verification')
  end

  def update_password(user)
    @edit_password_link = edit_user_password_url(user, token: user.verification_token)
    send_to(user, 'Update Password')
  end

  private

  def send_to(user, subject)
    @user = user
    mail to: @user.email, subject: prefixed_subject(subject)
  end

  def prefixed_subject(subject)
    "#{MinimalistAuthentication.configuration.email_prefix} #{subject}"
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
minimalist_authentication-2.4.0 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.3.0 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.2.4 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.2.3 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.2.2 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.2.1 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.2.0 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.1.5 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.1.4 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.1.3 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.1.2 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.1.1 app/mailers/minimalist_authentication_mailer.rb
minimalist_authentication-2.1.0 app/mailers/minimalist_authentication_mailer.rb