From 2fa289efa89a325f9a67dc08d516689d4c08324d Mon Sep 17 00:00:00 2001 From: Andrey Bakanovsky Date: Fri, 25 Aug 2023 16:50:07 +0300 Subject: [PATCH] feat(account invitation): abstain from the conditional assignment --- app/controllers/users/sessions_controller.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/app/controllers/users/sessions_controller.rb b/app/controllers/users/sessions_controller.rb index 32e3f81a..5a1a5de3 100644 --- a/app/controllers/users/sessions_controller.rb +++ b/app/controllers/users/sessions_controller.rb @@ -13,9 +13,8 @@ def new private def after_sign_in_path_for(_resource) - if (after_sign_in_url = session.delete(:after_sign_in_url)).present? - return after_sign_in_url - end + after_sign_in_url = session.delete(:after_sign_in_url) + return after_sign_in_url if after_sign_in_url.present? super end