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 <noreply@anthropic.com>
This commit is contained in:
Rosa Gutierrez
2026-02-21 09:29:32 +01:00
parent 92cb749e16
commit abef50c503
2 changed files with 9 additions and 1 deletions
@@ -5,7 +5,7 @@
<p class="txt-small">
You have <%= pluralize(Current.identity.devices.count, "mobile device") %> registered for push notifications.
</p>
<%= link_to "Manage devices", devices_path, class: "btn txt-small" %>
<%= link_to "Manage devices", saas.devices_path, class: "btn txt-small" %>
<% else %>
<p class="txt-small color-secondary">
No mobile devices registered. Install the iOS or Android app to receive push notifications on your phone.
@@ -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