Class: Notifiable::NotificationStatus

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
lib/notifiable/notification_status.rb

Instance Method Summary collapse

Instance Method Details

#opened!Object



12
13
14
15
# File 'lib/notifiable/notification_status.rb', line 12

def opened!
  update_attribute(:status, -1)
   self.notification.increment!(:opened_count)
end

#opened?Boolean

Returns:

  • (Boolean)


17
18
19
# File 'lib/notifiable/notification_status.rb', line 17

def opened?
  self.status == -1
end