Files
fizzy/saas/app/models/user/devices.rb
T
Rosa Gutierrez 9d32f3e845 Refactor devices controller and extract registration to model
- Remove Users namespace from DevicesController (now just DevicesController)
- Create ApplicationPushDevice model extending ActionPushNative::Device
- Move device registration logic (find_or_initialize + update) to model
- Update User::Devices concern to use ApplicationPushDevice
- Fix push notification tests (endpoint validation, job count expectations)
- Update push_config_test to use ActionPushNative.config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-25 19:31:13 +01:00

8 lines
170 B
Ruby

module User::Devices
extend ActiveSupport::Concern
included do
has_many :devices, class_name: "ApplicationPushDevice", as: :owner, dependent: :destroy
end
end