diff --git a/app/controllers/user/confirmations_controller.rb b/app/controllers/user/confirmations_controller.rb index f4fd337d6..82a1002ea 100644 --- a/app/controllers/user/confirmations_controller.rb +++ b/app/controllers/user/confirmations_controller.rb @@ -1,8 +1,7 @@ class User::ConfirmationsController < Devise::ConfirmationsController - protected - def after_confirmation_path_for(resource_name, resource) + def after_confirmation_path_for(_resource_name, resource) new_user_confirmation_path(resource) end end diff --git a/app/mailers/notify_devise_mailer.rb b/app/mailers/notify_devise_mailer.rb index 696041661..d54758831 100644 --- a/app/mailers/notify_devise_mailer.rb +++ b/app/mailers/notify_devise_mailer.rb @@ -1,5 +1,5 @@ class NotifyDeviseMailer < Devise::Mailer - require 'notifications/client' + require "notifications/client" def notify_client @notify_client ||= ::Notifications::Client.new(ENV["GOVUK_NOTIFY_API_KEY"]) @@ -13,27 +13,27 @@ class NotifyDeviseMailer < Devise::Mailer notify_client.send_email( email_address: email, template_id: template_id, - personalisation: personalisation + personalisation: personalisation, ) end - def reset_password_instructions(record, token, opts = {}) + def reset_password_instructions(record, token, _opts = {}) template_id = "4593417c-500f-452c-8111-0f9d311aad0e" personalisation = { name: record.name, email: record.email, - link: "https://#{host}/users/password/edit?reset_password_token=#{token}" + link: "https://#{host}/users/password/edit?reset_password_token=#{token}", } send_email(record.email, template_id, personalisation) end - def confirmation_instructions(record, token, opts = {}) + def confirmation_instructions(record, token, _opts = {}) template_id = "00cd7163-4213-4596-b4f9-9e72796e0d76" personalisation = { name: record.name, email: record.email, organisation: record.organisation.name, - link: "https://#{host}/users/confirmation?confirmation_token=#{token}" + link: "https://#{host}/users/confirmation?confirmation_token=#{token}", } send_email(record.email, template_id, personalisation) end diff --git a/app/views/devise/mailer/password_change.html.erb b/app/views/devise/mailer/password_change.html.erb deleted file mode 100644 index b41daf476..000000000 --- a/app/views/devise/mailer/password_change.html.erb +++ /dev/null @@ -1,3 +0,0 @@ -

Hello <%= @resource.email %>!

- -

We're contacting you to notify you that your password has been changed.

diff --git a/app/views/devise/mailer/unlock_instructions.html.erb b/app/views/devise/mailer/unlock_instructions.html.erb deleted file mode 100644 index a36e910b5..000000000 --- a/app/views/devise/mailer/unlock_instructions.html.erb +++ /dev/null @@ -1,7 +0,0 @@ -

Hello <%= @resource.email %>!

- -

Your account has been locked due to an excessive number of unsuccessful sign in attempts.

- -

Click the link below to unlock your account:

- -

<%= govuk_link_to 'Unlock my account', unlock_url(@resource, unlock_token: @token) %>

diff --git a/config/routes.rb b/config/routes.rb index 5e5c596f7..4264aa6fd 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,7 +3,7 @@ Rails.application.routes.draw do devise_for :users, controllers: { passwords: "user/passwords", sessions: "user/sessions", - confirmations: "user/confirmations" + confirmations: "user/confirmations", }, path_names: { sign_in: "sign-in", sign_out: "sign-out" } # For details on the DSL available within this file, see https://guides.rubyonrails.org/routing.html