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



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

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

#opened?Boolean

Returns:

  • (Boolean)


20
21
22
# File 'lib/notifiable/notification_status.rb', line 20

def opened?
  status == -1
end