Sha256: 50c2e7afae5c2e25fa451ab98d9e0e33cdee69bd6030eeb4211f5182aec01937
Contents?: true
Size: 534 Bytes
Versions: 13
Compression:
Stored size: 534 Bytes
Contents
module Notifiable class NotificationStatus < ActiveRecord::Base belongs_to :notification, :class_name => 'Notifiable::Notification' validates :notification, presence: true belongs_to :device_token, :class_name => 'Notifiable::DeviceToken' validates :device_token, presence: true self.table_name = 'notifiable_statuses' def opened! update_attribute(:status, -1) self.notification.increment!(:opened_count) end def opened? self.status == -1 end end end
Version data entries
13 entries across 13 versions & 1 rubygems