From 029c859fcbe916f0f97387567fcab970bbfe61d1 Mon Sep 17 00:00:00 2001 From: Guillem Arias Date: Mon, 11 May 2026 19:37:35 +0200 Subject: [PATCH] fix(savings_goals/empty_state): pass return_to so user lands back on /savings_goals after adding an account The "Add an account" CTA on the no-depository-accounts empty state now appends ?return_to=/savings_goals. StoreLocation already stashes the param into session via the global before_action; the consuming side (subtype #create actions) honouring it is tracked at we-promise/sure#1766. --- app/views/savings_goals/_empty_state.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/savings_goals/_empty_state.html.erb b/app/views/savings_goals/_empty_state.html.erb index b11492b5a..e8b9da871 100644 --- a/app/views/savings_goals/_empty_state.html.erb +++ b/app/views/savings_goals/_empty_state.html.erb @@ -21,7 +21,7 @@ <%= render DS::Link.new( text: t("savings_goals.empty_state.add_account"), variant: "primary", - href: new_account_path, + href: new_account_path(return_to: savings_goals_path), icon: "plus" ) %> <% end %>