Browse Source

Rubocop

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

5
app/controllers/auth/confirmations_controller.rb

@ -1,5 +1,4 @@
class Auth::ConfirmationsController < Devise::ConfirmationsController
# GET /resource/confirmation?confirmation_token=abcdef
def show
self.resource = resource_class.confirm_by_token(params[:confirmation_token])
@ -13,10 +12,10 @@ class Auth::ConfirmationsController < Devise::ConfirmationsController
url = "#{base}?reset_password_token=#{token}"
redirect_to url
else
respond_with_navigational(resource){ redirect_to after_confirmation_path_for(resource_name, resource) }
respond_with_navigational(resource) { redirect_to after_confirmation_path_for(resource_name, resource) }
end
else
respond_with_navigational(resource.errors, status: :unprocessable_entity){ render :new }
respond_with_navigational(resource.errors, status: :unprocessable_entity) { render :new }
end
end
end

6
app/mailers/devise_notify_mailer.rb

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

Loading…
Cancel
Save