Browse Source

Rubocop

pull/580/head
baarkerlounger 3 years ago
parent
commit
2410f5d0f8
  1. 1
      app/controllers/auth/confirmations_controller.rb
  2. 6
      app/mailers/devise_notify_mailer.rb

1
app/controllers/auth/confirmations_controller.rb

@ -1,5 +1,4 @@
class Auth::ConfirmationsController < Devise::ConfirmationsController class Auth::ConfirmationsController < Devise::ConfirmationsController
# GET /resource/confirmation?confirmation_token=abcdef # GET /resource/confirmation?confirmation_token=abcdef
def show def show
self.resource = resource_class.confirm_by_token(params[:confirmation_token]) self.resource = resource_class.confirm_by_token(params[:confirmation_token])

6
app/mailers/devise_notify_mailer.rb

@ -14,7 +14,7 @@ class DeviseNotifyMailer < Devise::Mailer
end end
def personalisation(record, token, url) def personalisation(record, token, url)
personalisation = { {
name: record.name || record.email, name: record.name || record.email,
email: record.email, email: record.email,
organisation: record.respond_to?(:organisation) ? record.organisation.name : "", organisation: record.respond_to?(:organisation) ? record.organisation.name : "",
@ -28,7 +28,7 @@ class DeviseNotifyMailer < Devise::Mailer
send_email( send_email(
record.email, record.email,
record.reset_password_notify_template, record.reset_password_notify_template,
personalisation(record, token, url) personalisation(record, token, url),
) )
end end
@ -37,7 +37,7 @@ class DeviseNotifyMailer < Devise::Mailer
send_email( send_email(
record.email, record.email,
record.confirmable_template, record.confirmable_template,
personalisation(record, token, url) personalisation(record, token, url),
) )
end end

Loading…
Cancel
Save