Sha256: 3e9d8874f6ac63b5d2072c586f1e91ecc1b5467da1cc2f4615b79e1ad36d14c7
Contents?: true
Size: 383 Bytes
Versions: 28
Compression:
Stored size: 383 Bytes
Contents
module Rpush module Client module ActiveModel module Pushy class TimeToLiveValidator < ::ActiveModel::Validator def validate(record) return if record.time_to_live.blank? || record.time_to_live <= 1.year.seconds record.errors.add(:time_to_live, 'The maximum value is 1 year') end end end end end end
Version data entries
28 entries across 28 versions & 2 rubygems