class Rpush::Client::ActiveModel::Pushy::TimeToLiveValidator
Public Instance Methods
validate(record)
click to toggle source
# File lib/rpush/client/active_model/pushy/time_to_live_validator.rb, line 6 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