Skip to content

Commit

Permalink
Make configuration name argument required in RodauthMailer
Browse files Browse the repository at this point in the history
This avoids Rubocop complaints. It's unlikely that people will test
the mailer directly anyway, so there is little benefit in making the
argument optional.
  • Loading branch information
janko committed Sep 11, 2022
1 parent 4ec21ff commit 523c2a0
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/generators/rodauth/templates/app/mailers/rodauth_mailer.rb
Original file line number Diff line number Diff line change
@@ -1,40 +1,40 @@
class RodauthMailer < ApplicationMailer
def verify_account(name = nil, account_id, key)
def verify_account(name, account_id, key)
@email_link = email_link(name, :verify_account, account_id, key)
@account = find_account(name, account_id)

mail to: @account.email, subject: rodauth(name).verify_account_email_subject
end

def reset_password(name = nil, account_id, key)
def reset_password(name, account_id, key)
@email_link = email_link(name, :reset_password, account_id, key)
@account = find_account(name, account_id)

mail to: @account.email, subject: rodauth(name).reset_password_email_subject
end

def verify_login_change(name = nil, account_id, key)
def verify_login_change(name, account_id, key)
@email_link = email_link(name, :verify_login_change, account_id, key)
@account = find_account(name, account_id)
@new_email = @account.login_change_key.login

mail to: @new_email, subject: rodauth(name).verify_login_change_email_subject
end

def password_changed(name = nil, account_id)
def password_changed(name, account_id)
@account = find_account(name, account_id)

mail to: @account.email, subject: rodauth(name).password_changed_email_subject
end

# def email_auth(name = nil, account_id, key)
# def email_auth(name, account_id, key)
# @email_link = email_link(name, :email_auth, account_id, key)
# @account = find_account(name, account_id)

# mail to: @account.email, subject: rodauth(name).email_auth_email_subject
# end

# def unlock_account(name = nil, account_id, key)
# def unlock_account(name, account_id, key)
# @email_link = email_link(name, :unlock_account, account_id, key)
# @account = find_account(name, account_id)

Expand Down

0 comments on commit 523c2a0

Please sign in to comment.