Sha256: 8991913b99d4d4b778b237f9cb841951a72aeb2970c72c33ab2b45f9371b90b5
Contents?: true
Size: 458 Bytes
Versions: 11
Compression:
Stored size: 458 Bytes
Contents
module FwtPushNotificationServer class DeviceToken < ActiveRecord::Base validates_uniqueness_of :token validates_presence_of :token validates_presence_of :provider def user user_id.blank? ? nil : FwtPushNotificationServer.user_class.find_or_create_by(FwtPushNotificationServer.user_key => user_id) end def notifier return nil if provider.nil? FwtPushNotificationServer.notifiers[provider.to_sym] end end end
Version data entries
11 entries across 11 versions & 1 rubygems