From f9d04595467ed4afb7afe5f8cea384378c2abc0a Mon Sep 17 00:00:00 2001 From: Nixon Date: Wed, 30 Oct 2024 05:00:20 -0300 Subject: [PATCH] cosmetic --- .../html/sessions/passwordlesses_controller.rb.tt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/generators/authentication/templates/controllers/html/sessions/passwordlesses_controller.rb.tt b/lib/generators/authentication/templates/controllers/html/sessions/passwordlesses_controller.rb.tt index 67d72e5..4ac6a60 100644 --- a/lib/generators/authentication/templates/controllers/html/sessions/passwordlesses_controller.rb.tt +++ b/lib/generators/authentication/templates/controllers/html/sessions/passwordlesses_controller.rb.tt @@ -13,7 +13,8 @@ class Sessions::PasswordlessesController < ApplicationController session_record = @user.sessions.create! cookies.signed.permanent[:session_token] = { value: session_record.id, httponly: true } - revoke_tokens; redirect_to(root_path, notice: "Signed in successfully") + revoke_sign_in_tokens + redirect_to(root_path, notice: "Signed in successfully") end def create @@ -36,7 +37,7 @@ class Sessions::PasswordlessesController < ApplicationController UserMailer.with(user: @user).passwordless.deliver_later end - def revoke_tokens + def revoke_sign_in_tokens @user.sign_in_tokens.delete_all end end