Move devices table to saas database

Use ActionPushNative's new on_load hook to configure the database connection,
following the same pattern as Active Storage and Action Text:

  ActiveSupport.on_load(:action_push_native_record) do
    connects_to database: { writing: :saas, reading: :saas }
  end

This allows ApplicationPushDevice to inherit directly from ActionPushNative::Device
without needing an intermediate abstract class.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Rosa Gutierrez
2026-01-22 13:01:21 +01:00
parent 1b53396050
commit 34fd62faf1
9 changed files with 24 additions and 31 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ gem "console1984", bc: "console1984"
gem "audits1984", bc: "audits1984", branch: "flavorjones/coworker-api"
# Native push notifications (iOS/Android)
gem "action_push_native", github: "rails/action_push_native"
gem "action_push_native", github: "rails/action_push_native", branch: "add-abstract-record"
# Telemetry
gem "rails_structured_logging", bc: "rails-structured-logging"