Retrospring/app/models/web_push_subscription.rb

9 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