2022-09-11 20:10:21 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class WebPushSubscription < ApplicationRecord
|
|
|
|
belongs_to :user
|
2022-12-28 00:22:51 +01:00
|
|
|
|
|
|
|
scope :active, -> { where(failures: ...3) }
|
|
|
|
scope :failed, -> { where(failures: 3..) }
|
2022-09-11 20:10:21 +02:00
|
|
|
end
|