Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jtomchak committed Nov 8, 2023
1 parent ed2459e commit 43ee7c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
11 changes: 4 additions & 7 deletions app/mailers/user_mailer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,13 @@ def confirmation_instructions(user, token, *, **)
@resource = user
@token = token
@instance = Rails.configuration.x.local_domain
Rails.logger.warn 'EMAIL CONFIRMATION>>'

return unless @resource.active_for_authentication?

Appsignal.instrument('email.confirmation_instructions') do
I18n.with_locale(locale) do
mail to: @resource.unconfirmed_email.presence || @resource.email,
subject: I18n.t(@resource.pending_reconfirmation? ? 'devise.mailer.reconfirmation_instructions.subject' : 'devise.mailer.confirmation_instructions.subject', instance: @instance),
template_name: @resource.pending_reconfirmation? ? 'reconfirmation_instructions' : 'confirmation_instructions'
end
I18n.with_locale(locale) do
mail to: @resource.unconfirmed_email.presence || @resource.email,
subject: I18n.t(@resource.pending_reconfirmation? ? 'devise.mailer.reconfirmation_instructions.subject' : 'devise.mailer.confirmation_instructions.subject', instance: @instance),
template_name: @resource.pending_reconfirmation? ? 'reconfirmation_instructions' : 'confirmation_instructions'
end
end

Expand Down
8 changes: 0 additions & 8 deletions config/initializers/lograge.rb

This file was deleted.

0 comments on commit 43ee7c0

Please sign in to comment.