From abef50c5036797311baa6feef7ecd716df452f53 Mon Sep 17 00:00:00 2001 From: Rosa Gutierrez Date: Sat, 21 Feb 2026 09:29:32 +0100 Subject: [PATCH] Fix devices_path route helper in native devices partial The manage devices link used `devices_path` but the route is defined in the saas engine, so it needs `saas.devices_path`. Co-Authored-By: Claude Opus 4.6 --- .../views/notifications/settings/_native_devices.html.erb | 2 +- saas/test/controllers/devices_controller_test.rb | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/saas/app/views/notifications/settings/_native_devices.html.erb b/saas/app/views/notifications/settings/_native_devices.html.erb index ea9e9987d..a0ddbed13 100644 --- a/saas/app/views/notifications/settings/_native_devices.html.erb +++ b/saas/app/views/notifications/settings/_native_devices.html.erb @@ -5,7 +5,7 @@

You have <%= pluralize(Current.identity.devices.count, "mobile device") %> registered for push notifications.

- <%= link_to "Manage devices", devices_path, class: "btn txt-small" %> + <%= link_to "Manage devices", saas.devices_path, class: "btn txt-small" %> <% else %>

No mobile devices registered. Install the iOS or Android app to receive push notifications on your phone. diff --git a/saas/test/controllers/devices_controller_test.rb b/saas/test/controllers/devices_controller_test.rb index b05ca5ed2..8b37a0164 100644 --- a/saas/test/controllers/devices_controller_test.rb +++ b/saas/test/controllers/devices_controller_test.rb @@ -25,6 +25,14 @@ class DevicesControllerTest < ActionDispatch::IntegrationTest assert_select "p", /No devices registered/ end + test "show notification settings with registered devices" do + @identity.devices.create!(token: "test_token", platform: "apple", name: "iPhone 15 Pro") + + get notifications_settings_path + + assert_response :success + end + test "index requires authentication" do sign_out