module Notifications::Model
Constants
- DEFAULT_AVATAR
Public Instance Methods
actor_avatar_url()
click to toggle source
# File lib/notifications/model.rb, line 28 def actor_avatar_url return DEFAULT_AVATAR if Notifications.config.user_avatar_url_method.blank? return DEFAULT_AVATAR if self.actor.blank? self.actor.send(Notifications.config.user_avatar_url_method) end
actor_name()
click to toggle source
# File lib/notifications/model.rb, line 23 def actor_name return "" if self.actor.blank? self.actor.send(Notifications.config.user_name_method) end
actor_profile_url()
click to toggle source
# File lib/notifications/model.rb, line 34 def actor_profile_url return nil if Notifications.config.user_profile_url_method.blank? return nil if self.actor.blank? self.actor.send(Notifications.config.user_profile_url_method) end
read?()
click to toggle source
# File lib/notifications/model.rb, line 19 def read? self.read_at.present? end