Sha256: 758c4cb3df6574ac6a2e5d2615ea04a326f005a40f21d66e89db59c35386daf5
Contents?: true
Size: 597 Bytes
Versions: 99
Compression:
Stored size: 597 Bytes
Contents
module Mumuki::Laboratory::Controllers::Notifications def user_notifications_path user_path(anchor: current_notifications_tab) end def has_notifications? notifications_count > 0 end def notifications_count messages_count + discussions_count end private def current_notifications_tab has_messages? ? 'messages' : 'discussions' end def has_messages? messages_count > 0 end def messages_count current_user.try(:unread_messages).try(:count) || 0 end def discussions_count current_user.try(:unread_discussions).try(:count) || 0 end end
Version data entries
99 entries across 99 versions & 1 rubygems