Browse Source

Fix for deleted email confirmations

development
Godwin 8 years ago
parent
commit
f8ce4130ca
  1. 8
      app/mailers/user_mailer.rb

8
app/mailers/user_mailer.rb

@ -9,9 +9,11 @@ class UserMailer < ActionMailer::Base
default from: "Bike!Bike! <info@bikebike.org>" default from: "Bike!Bike! <info@bikebike.org>"
def email_confirmation(confirmation) def email_confirmation(confirmation)
@confirmation = EmailConfirmation.find(confirmation) if confirmation.present? @confirmation = EmailConfirmation.find_by_id(confirmation) if confirmation.present?
I18n.locale = @confirmation.user.locale if @confirmation.user.locale.present? if @confirmation.present?
mail to: @confirmation.user.named_email, subject: clean_subject(_'email.subject.confirm_email','Please confirm your email address') I18n.locale = @confirmation.user.locale if @confirmation.user.locale.present?
mail to: @confirmation.user.named_email, subject: clean_subject(_'email.subject.confirm_email','Please confirm your email address')
end
end end
def registration_confirmation(registration) def registration_confirmation(registration)

Loading…
Cancel
Save