Sha256: 5fd297e0397702430e286349fa32c05d35fb19c7b30114b4e4c699140b3c01fd

Contents?: true

Size: 385 Bytes

Versions: 20

Compression:

Stored size: 385 Bytes

Contents

module Notifiable
  class NotificationStatus < ActiveRecord::Base
    belongs_to :notification, :class_name => 'Notifiable::Notification'
    belongs_to :device_token, :class_name => 'Notifiable::DeviceToken'
    
    self.table_name = 'notifiable_statuses'
    
    def opened!
      update_attribute(:status, -1)
    end
    
    def opened?
      self.status == -1
    end
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
notifiable-rails-0.20.0 lib/notifiable/notification_status.rb
notifiable-rails-0.19.9 lib/notifiable/notification_status.rb
notifiable-rails-0.19.7 lib/notifiable/notification_status.rb
notifiable-rails-0.19.6 lib/notifiable/notification_status.rb
notifiable-rails-0.19.5 lib/notifiable/notification_status.rb
notifiable-rails-0.19.4 lib/notifiable/notification_status.rb
notifiable-rails-0.19.3 lib/notifiable/notification_status.rb
notifiable-rails-0.19.2 lib/notifiable/notification_status.rb
notifiable-rails-0.19.1 lib/notifiable/notification_status.rb
notifiable-rails-0.19.0 lib/notifiable/notification_status.rb
notifiable-rails-0.18.0 lib/notifiable/notification_status.rb
notifiable-rails-0.17.0 lib/notifiable/notification_status.rb
notifiable-rails-0.16.0 lib/notifiable/notification_status.rb
notifiable-rails-0.15.3 lib/notifiable/notification_status.rb
notifiable-rails-0.15.2 lib/notifiable/notification_status.rb
notifiable-rails-0.15.1 lib/notifiable/notification_status.rb
notifiable-rails-0.15.0 lib/notifiable/notification_status.rb
notifiable-rails-0.14.1 lib/notifiable/notification_status.rb
notifiable-rails-0.14.0 lib/notifiable/notification_status.rb
notifiable-rails-0.13.0 lib/notifiable/notification_status.rb