retrospring/app/models/web_push_subscription.rb
2023-01-02 11:51:46 +01:00

8 lines
192 B
Ruby

# frozen_string_literal: true
class WebPushSubscription < ApplicationRecord
belongs_to :user
scope :active, -> { where(failures: ...3) }
scope :failed, -> { where(failures: 3..) }
end